mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Erwan Le Ray <erwan.leray@foss.st.com>
Cc: Jiri Slaby <jslaby@suse.com>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	linux-serial@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Fabrice Gasnier <fabrice.gasnier@foss.st.com>,
	Valentin Caron <valentin.caron@foss.st.com>,
	Amelie Delaunay <amelie.delaunay@foss.st.com>
Subject: Re: [PATCH 1/2] serial: stm32: reset dma buffers during probe
Date: Thu, 27 May 2021 11:49:01 +0200	[thread overview]
Message-ID: <YK9rDVeg0W9WE+9a@kroah.com> (raw)
In-Reply-To: <20210527091537.8997-2-erwan.leray@foss.st.com>

On Thu, May 27, 2021 at 11:15:36AM +0200, Erwan Le Ray wrote:
> Reset Rx and Tx dma buffers during probe to avoid freeing
> invalid buffer in no dma mode.
> 
> Signed-off-by: Erwan Le Ray <erwan.leray@foss.st.com>
> 
> diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c
> index c2ae7b392b86..2ac3b30477a7 100644
> --- a/drivers/tty/serial/stm32-usart.c
> +++ b/drivers/tty/serial/stm32-usart.c
> @@ -1168,6 +1168,8 @@ static struct stm32_port *stm32_usart_of_get_port(struct platform_device *pdev)
>  	stm32_ports[id].cr1_irq = USART_CR1_RXNEIE;
>  	stm32_ports[id].cr3_irq = 0;
>  	stm32_ports[id].last_res = RX_BUF_L;
> +	stm32_ports[id].rx_dma_buf = 0;
> +	stm32_ports[id].tx_dma_buf = 0;
>  	return &stm32_ports[id];
>  }
>  
> -- 
> 2.17.1
> 

Is this a bugfix?  if so, what commit does this fix and does it need to
be backported anywhere?

thanks,

greg k-h

  reply	other threads:[~2021-05-27  9:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-27  9:15 [PATCH 0/2] stm32 usart improve DMA probe Erwan Le Ray
2021-05-27  9:15 ` [PATCH 1/2] serial: stm32: reset dma buffers during probe Erwan Le Ray
2021-05-27  9:49   ` Greg Kroah-Hartman [this message]
2021-06-09 12:38     ` Greg Kroah-Hartman
2021-06-10  8:54     ` Erwan LE RAY
2021-05-27  9:15 ` [PATCH 2/2] serial: stm32: defer probe for dma devices Erwan Le Ray

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YK9rDVeg0W9WE+9a@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=alexandre.torgue@foss.st.com \
    --cc=amelie.delaunay@foss.st.com \
    --cc=erwan.leray@foss.st.com \
    --cc=fabrice.gasnier@foss.st.com \
    --cc=jslaby@suse.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=valentin.caron@foss.st.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®