serial: 8250_dma: Convert to use uart_xmit_advance()
PATCH 1/1 serial: 8250_dma: Convert to use uart_xmit_advance()
uart_xmit_advance() provides a common way on how to advance the Tx queue. Use it for the sake of unification and robustness.
--- drivers/tty/serial/8250/8250_dma.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/tty/serial/8250/8250_dma.c +1 -3
@@ -26,9 +26,7 @@ static void __dma_tx_complete(void *param) dma->tx_running =0 ; - xmit->tail += dma->tx_size; - xmit->tail &=UART_XMIT_SIZE -1 ; - p->port.icount.tx += dma->tx_size; +uart_xmit_advance (&p->port, dma->tx_size);if (uart_circ_chars_pending (xmit) <WAKEUP_CHARS )uart_write_wakeup (&p->port);
Signature · 1 line
2.35.1
Quoted 13 lines · Andy Shevchenko
uart_xmit_advance()provides a common way on how to advance the Tx queue. Use it for the sake of unification and robustness.Signed-off-by Andy Shevchenko <[email protected]>--- drivers/tty/serial/8250/8250_dma.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/tty/serial/8250/8250_dma.c +0
-0
drivers/tty/serial/8250/8250_dma.c static void __dma_tx_complete(void *param) · line 32
Quoted 10 lines
drivers/tty/serial/8250/8250_dma.c +1
-3@@ -26,9 +26,7 @@ static void __dma_tx_complete(void *param) dma->tx_running =0 ; - xmit->tail += dma->tx_size; - xmit->tail &=UART_XMIT_SIZE -1 ; - p->port.icount.tx += dma->tx_size; +uart_xmit_advance (&p->port, dma->tx_size);if (uart_circ_chars_pending (xmit) <WAKEUP_CHARS )uart_write_wakeup (&p->port);
Please note though that I already have patches for almost all these but I've not just submitted the remaining ones yet.
Signature · 1 line
i.
Quoted 4 lines · Ilpo Järvinen
Quoted 2 lines · Andy Shevchenko
uart_xmit_advance()provides a common way on how to advance the Tx queue. Use it for the sake of unification and robustness.
...
Quoted 1 line
Reviewed-by Ilpo Järvinen <[email protected]>
Thanks!
Quoted 2 lines
Please note though that I already have patches for almost all these but I've not just submitted the remaining ones yet.
My interest only for a limited scope of 8250 compatible UARTs, I have sent just a couple of patches and I don't think I will send more.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Greg Kroah-Hartman
maintainerQuoted 26 lines · Andy Shevchenko
uart_xmit_advance()provides a common way on how to advance the Tx queue. Use it for the sake of unification and robustness.Signed-off-by Andy Shevchenko <[email protected]>--- drivers/tty/serial/8250/8250_dma.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/tty/serial/8250/8250_dma.c +1
-3@@ -26,9 +26,7 @@ static void __dma_tx_complete(void *param) dma->tx_running =0 ; - xmit->tail += dma->tx_size; - xmit->tail &=UART_XMIT_SIZE -1 ; - p->port.icount.tx += dma->tx_size; +uart_xmit_advance (&p->port, dma->tx_size);if (uart_circ_chars_pending (xmit) <WAKEUP_CHARS )uart_write_wakeup (&p->port);Signature · 1 line
2.35.1
Breaks the build :(
Quoted 22 lines · Greg Kroah-Hartman
Quoted 21 lines · Andy Shevchenko
uart_xmit_advance()provides a common way on how to advance the Tx queue. Use it for the sake of unification and robustness.Signed-off-by Andy Shevchenko <[email protected]>--- drivers/tty/serial/8250/8250_dma.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/tty/serial/8250/8250_dma.c +1
-3@@ -26,9 +26,7 @@ static void __dma_tx_complete(void *param) dma->tx_running =0 ; - xmit->tail += dma->tx_size; - xmit->tail &=UART_XMIT_SIZE -1 ; - p->port.icount.tx += dma->tx_size; +uart_xmit_advance (&p->port, dma->tx_size);
Quoted 7 lines
Quoted 5 lines
drivers/tty/serial/8250/8250_dma.c +0
-0if (uart_circ_chars_pending (xmit) <WAKEUP_CHARS )uart_write_wakeup (&p->port);Signature · 1 line
2.35.1Breaks the build :(
I'd guess it's because uart_xmit_advance() is current only in tty-linus, not in tty-next.
Signature · 1 line
i.
Greg Kroah-Hartman
maintainerQuoted 32 lines · Ilpo Järvinen
Quoted 22 lines · Greg Kroah-Hartman
Quoted 21 lines · Andy Shevchenko
uart_xmit_advance()provides a common way on how to advance the Tx queue. Use it for the sake of unification and robustness.Signed-off-by Andy Shevchenko <[email protected]>--- drivers/tty/serial/8250/8250_dma.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/tty/serial/8250/8250_dma.c +1
-3@@ -26,9 +26,7 @@ static void __dma_tx_complete(void *param) dma->tx_running =0 ; - xmit->tail += dma->tx_size; - xmit->tail &=UART_XMIT_SIZE -1 ; - p->port.icount.tx += dma->tx_size; +uart_xmit_advance (&p->port, dma->tx_size);Quoted 7 lines
Quoted 5 lines
drivers/tty/serial/8250/8250_dma.c +0
-0if (uart_circ_chars_pending (xmit) <WAKEUP_CHARS )uart_write_wakeup (&p->port);Signature · 1 line
2.35.1Breaks the build :(
Quoted 2 lines
I'd guess it's because
uart_xmit_advance()is current only in tty-linus, not in tty-next.
Probably, can someone resend this when 6.1-rc1 is out?
thanks,
greg k-h
Quoted 3 lines · Greg Kroah-Hartman
Quoted 2 lines · Ilpo Järvinen
Quoted 1 line · Greg Kroah-Hartman
On Fri, Sep 09, 2022 at 12:11:02PM +0300, Andy Shevchenko wrote:
...
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Breaks the build :(
I'd guess it's because
uart_xmit_advance()is current only in tty-linus, not in tty-next.Probably, can someone resend this when 6.1-rc1 is out?
Sure.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Greg Kroah-Hartman
maintainerQuoted 7 lines · Andy Shevchenko
Quoted 3 lines · Greg Kroah-Hartman
Quoted 2 lines · Ilpo Järvinen
Quoted 1 line · Greg Kroah-Hartman
On Fri, Sep 09, 2022 at 12:11:02PM +0300, Andy Shevchenko wrote:
...
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Breaks the build :(
I'd guess it's because
uart_xmit_advance()is current only in tty-linus, not in tty-next.Probably, can someone resend this when 6.1-rc1 is out?
Sure.
Nevermind, I took them now, thanks.
greg k-h