[PATCH] serial: 8250_dma: terminate correct DMA in tx_dma_flush()

John Keeping posted 1 patch 11 months, 2 weeks ago
drivers/tty/serial/8250/8250_dma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] serial: 8250_dma: terminate correct DMA in tx_dma_flush()
Posted by John Keeping 11 months, 2 weeks ago
When flushing transmit side DMA, it is the transmit channel that should
be terminated, not the receive channel.

Fixes: 9e512eaaf8f40 ("serial: 8250: Fix fifo underflow on flush")
Reported-by: Wentao Guan <guanwentao@uniontech.com>
Signed-off-by: John Keeping <jkeeping@inmusicbrands.com>
---
 drivers/tty/serial/8250/8250_dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/8250/8250_dma.c b/drivers/tty/serial/8250/8250_dma.c
index f245a84f4a508..bdd26c9f34bdf 100644
--- a/drivers/tty/serial/8250/8250_dma.c
+++ b/drivers/tty/serial/8250/8250_dma.c
@@ -162,7 +162,7 @@ void serial8250_tx_dma_flush(struct uart_8250_port *p)
 	 */
 	dma->tx_size = 0;
 
-	dmaengine_terminate_async(dma->rxchan);
+	dmaengine_terminate_async(dma->txchan);
 }
 
 int serial8250_rx_dma(struct uart_8250_port *p)
-- 
2.48.1
Re: [PATCH] serial: 8250_dma: terminate correct DMA in tx_dma_flush()
Posted by Ilpo Järvinen 10 months, 3 weeks ago
On Mon, 24 Feb 2025, John Keeping wrote:

> When flushing transmit side DMA, it is the transmit channel that should
> be terminated, not the receive channel.
> 
> Fixes: 9e512eaaf8f40 ("serial: 8250: Fix fifo underflow on flush")
> Reported-by: Wentao Guan <guanwentao@uniontech.com>
> Signed-off-by: John Keeping <jkeeping@inmusicbrands.com>
> ---
>  drivers/tty/serial/8250/8250_dma.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/serial/8250/8250_dma.c b/drivers/tty/serial/8250/8250_dma.c
> index f245a84f4a508..bdd26c9f34bdf 100644
> --- a/drivers/tty/serial/8250/8250_dma.c
> +++ b/drivers/tty/serial/8250/8250_dma.c
> @@ -162,7 +162,7 @@ void serial8250_tx_dma_flush(struct uart_8250_port *p)
>  	 */
>  	dma->tx_size = 0;
>  
> -	dmaengine_terminate_async(dma->rxchan);
> +	dmaengine_terminate_async(dma->txchan);
>  }
>  
>  int serial8250_rx_dma(struct uart_8250_port *p)
> 

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

-- 
 i.
Re:[PATCH] serial: 8250_dma: terminate correct DMA in tx_dma_flush()
Posted by Wentao Guan 10 months, 3 weeks ago
Ping?
Re: [PATCH] serial: 8250_dma: terminate correct DMA in tx_dma_flush()
Posted by Greg KH 10 months, 3 weeks ago
On Wed, Mar 19, 2025 at 02:14:40PM +0800, Wentao Guan wrote:
> Ping?

Context-less pings help no one :(
Re: [PATCH] serial: 8250_dma: terminate correct DMA in tx_dma_flush()
Posted by Wentao Guan 10 months, 3 weeks ago
Hello,

The ping query the patch state:

[PATCH] serial: 8250_dma: terminate correct DMA in tx_dma_flush()

When flushing transmit side DMA, it is the transmit channel that should
be terminated, not the receive channel.

Fixes: 9e512eaaf8f40 ("serial: 8250: Fix fifo underflow on flush")
Reported-by: Wentao Guan <guanwentao@uniontech.com>
Signed-off-by: John Keeping <jkeeping@inmusicbrands.com>
---
 drivers/tty/serial/8250/8250_dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/8250/8250_dma.c b/drivers/tty/serial/8250/8250_dma.c
index f245a84f4a508..bdd26c9f34bdf 100644
--- a/drivers/tty/serial/8250/8250_dma.c
+++ b/drivers/tty/serial/8250/8250_dma.c
@@ -162,7 +162,7 @@ void serial8250_tx_dma_flush(struct uart_8250_port *p)
   */
  dma->tx_size = 0;
 
- dmaengine_terminate_async(dma->rxchan);
+ dmaengine_terminate_async(dma->txchan);
 }
 
 int serial8250_rx_dma(struct uart_8250_port *p)
-- 
2.48.1
Re:[PATCH] serial: 8250_dma: terminate correct DMA in tx_dma_flush()
Posted by Wentao Guan 11 months, 2 weeks ago
Hello,
Thanks for reply.
+ Cc: stable@vger.kernel.org

BRs
Wentao Guan
Re: [PATCH] serial: 8250_dma: terminate correct DMA in tx_dma_flush()
Posted by Greg KH 11 months, 2 weeks ago
On Mon, Feb 24, 2025 at 08:36:20PM +0800, Wentao Guan wrote:
> Hello,
> Thanks for reply.
> + Cc: stable@vger.kernel.org

I have no context at all here, sorry.  What am I supposed to do?

confused,

greg k-h
Re: [PATCH] serial: 8250_dma: terminate correct DMA in tx_dma_flush()
Posted by Greg KH 11 months, 2 weeks ago
On Mon, Feb 24, 2025 at 08:36:20PM +0800, Wentao Guan wrote:
> Hello,
> Thanks for reply.
> + Cc: stable@vger.kernel.org
> 
> BRs
> Wentao Guan

<formletter>

This is not the correct way to submit patches for inclusion in the
stable kernel tree.  Please read:
    https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.

</formletter>
Re: [PATCH] serial: 8250_dma: terminate correct DMA in tx_dma_flush()
Posted by Wentao Guan 11 months, 2 weeks ago
Hello Greg,
Sorry for my HTML format past.
It is means that 'Fixes xxxxxx' tag point commit will auto be backport to those stable tree with
xxxxxx commit without cc stable, correct ?

BRs
Wentao Guan
Re: [PATCH] serial: 8250_dma: terminate correct DMA in tx_dma_flush()
Posted by Slade Watkins 11 months, 2 weeks ago
On 2/24/2025 8:13 AM, Wentao Guan wrote:
> It is means that 'Fixes xxxxxx' tag point commit will auto be backport 
> to those stable tree with xxxxxx commit without cc stable, correct ?

If you mean that it will be "automatically backported to stable," then 
no. Ask for it to be backported, or submit it as a patch the proper way: 
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html

Otherwise, I have no idea what you're talking about either. :-/

-slade
Re: [PATCH] serial: 8250_dma: terminate correct DMA in tx_dma_flush()
Posted by Wentao Guan 11 months, 2 weeks ago
Hello Slade,

Thanks for reply my question.

BRs
Wentao Guan
Re: [PATCH] serial: 8250_dma: terminate correct DMA in tx_dma_flush()
Posted by Greg KH 11 months, 2 weeks ago
On Mon, Feb 24, 2025 at 09:13:29PM +0800, Wentao Guan wrote:
> Hello Greg,
> Sorry for my HTML format past.
> It is means that 'Fixes xxxxxx' tag point commit will auto be backport to those stable tree with
> xxxxxx commit without cc stable, correct ?

I am sorry, again, I have no context at all as to what you are asking :(

remember, some of us get 1000+ emails a day to handle.  Always quote
context properly so we know what is going on.

thanks,

greg k-h