All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/1] serial: 8250_dma: Convert to use uart_xmit_advance()
@ 2022-09-09  9:11 Andy Shevchenko
  2022-09-09  9:16 ` Ilpo Järvinen
  2022-09-22 14:10 ` Greg Kroah-Hartman
  0 siblings, 2 replies; 8+ messages in thread
From: Andy Shevchenko @ 2022-09-09  9:11 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Ilpo Järvinen, linux-serial, linux-kernel
  Cc: Jiri Slaby, 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 <andriy.shevchenko@linux.intel.com>
---
 drivers/tty/serial/8250/8250_dma.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_dma.c b/drivers/tty/serial/8250/8250_dma.c
index d99020fd3427..b85c82616e8c 100644
--- a/drivers/tty/serial/8250/8250_dma.c
+++ b/drivers/tty/serial/8250/8250_dma.c
@@ -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);
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH v1 1/1] serial: 8250_dma: Convert to use uart_xmit_advance()
  2022-09-09  9:11 [PATCH v1 1/1] serial: 8250_dma: Convert to use uart_xmit_advance() Andy Shevchenko
@ 2022-09-09  9:16 ` Ilpo Järvinen
  2022-09-09 10:17   ` Andy Shevchenko
  2022-09-22 14:10 ` Greg Kroah-Hartman
  1 sibling, 1 reply; 8+ messages in thread
From: Ilpo Järvinen @ 2022-09-09  9:16 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: Greg Kroah-Hartman, linux-serial, LKML, Jiri Slaby

[-- Attachment #1: Type: text/plain, Size: 1102 bytes --]

On Fri, 9 Sep 2022, Andy Shevchenko wrote:

> 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 <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/tty/serial/8250/8250_dma.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/tty/serial/8250/8250_dma.c b/drivers/tty/serial/8250/8250_dma.c
> index d99020fd3427..b85c82616e8c 100644
> --- a/drivers/tty/serial/8250/8250_dma.c
> +++ b/drivers/tty/serial/8250/8250_dma.c
> @@ -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);

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

Please note though that I already have patches for almost all these but 
I've not just submitted the remaining ones yet.


-- 
 i.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v1 1/1] serial: 8250_dma: Convert to use uart_xmit_advance()
  2022-09-09  9:16 ` Ilpo Järvinen
@ 2022-09-09 10:17   ` Andy Shevchenko
  0 siblings, 0 replies; 8+ messages in thread
From: Andy Shevchenko @ 2022-09-09 10:17 UTC (permalink / raw)
  To: Ilpo Järvinen; +Cc: Greg Kroah-Hartman, linux-serial, LKML, Jiri Slaby

On Fri, Sep 09, 2022 at 12:16:58PM +0300, Ilpo Järvinen wrote:
> On Fri, 9 Sep 2022, Andy Shevchenko wrote:
> 
> > uart_xmit_advance() provides a common way on how to advance
> > the Tx queue. Use it for the sake of unification and robustness.

...

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

Thanks!

> 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.


-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v1 1/1] serial: 8250_dma: Convert to use uart_xmit_advance()
  2022-09-09  9:11 [PATCH v1 1/1] serial: 8250_dma: Convert to use uart_xmit_advance() Andy Shevchenko
  2022-09-09  9:16 ` Ilpo Järvinen
@ 2022-09-22 14:10 ` Greg Kroah-Hartman
  2022-09-22 14:24   ` Ilpo Järvinen
  1 sibling, 1 reply; 8+ messages in thread
From: Greg Kroah-Hartman @ 2022-09-22 14:10 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Ilpo Järvinen, linux-serial, linux-kernel, Jiri Slaby

On Fri, Sep 09, 2022 at 12:11:02PM +0300, Andy Shevchenko wrote:
> 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 <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/tty/serial/8250/8250_dma.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/tty/serial/8250/8250_dma.c b/drivers/tty/serial/8250/8250_dma.c
> index d99020fd3427..b85c82616e8c 100644
> --- a/drivers/tty/serial/8250/8250_dma.c
> +++ b/drivers/tty/serial/8250/8250_dma.c
> @@ -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);
> -- 
> 2.35.1
> 

Breaks the build :(

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v1 1/1] serial: 8250_dma: Convert to use uart_xmit_advance()
  2022-09-22 14:10 ` Greg Kroah-Hartman
@ 2022-09-22 14:24   ` Ilpo Järvinen
  2022-09-22 14:33     ` Greg Kroah-Hartman
  0 siblings, 1 reply; 8+ messages in thread
From: Ilpo Järvinen @ 2022-09-22 14:24 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Andy Shevchenko, linux-serial, LKML, Jiri Slaby

On Thu, 22 Sep 2022, Greg Kroah-Hartman wrote:

> On Fri, Sep 09, 2022 at 12:11:02PM +0300, Andy Shevchenko wrote:
> > 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 <andriy.shevchenko@linux.intel.com>
> > ---
> >  drivers/tty/serial/8250/8250_dma.c | 4 +---
> >  1 file changed, 1 insertion(+), 3 deletions(-)
> > 
> > diff --git a/drivers/tty/serial/8250/8250_dma.c b/drivers/tty/serial/8250/8250_dma.c
> > index d99020fd3427..b85c82616e8c 100644
> > --- a/drivers/tty/serial/8250/8250_dma.c
> > +++ b/drivers/tty/serial/8250/8250_dma.c
> > @@ -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);
> > -- 
> > 2.35.1
> > 
> 
> Breaks the build :(

I'd guess it's because uart_xmit_advance() is current only in tty-linus, 
not in tty-next.

-- 
 i.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v1 1/1] serial: 8250_dma: Convert to use uart_xmit_advance()
  2022-09-22 14:24   ` Ilpo Järvinen
@ 2022-09-22 14:33     ` Greg Kroah-Hartman
  2022-09-22 15:03       ` Andy Shevchenko
  0 siblings, 1 reply; 8+ messages in thread
From: Greg Kroah-Hartman @ 2022-09-22 14:33 UTC (permalink / raw)
  To: Ilpo Järvinen; +Cc: Andy Shevchenko, linux-serial, LKML, Jiri Slaby

On Thu, Sep 22, 2022 at 05:24:55PM +0300, Ilpo Järvinen wrote:
> On Thu, 22 Sep 2022, Greg Kroah-Hartman wrote:
> 
> > On Fri, Sep 09, 2022 at 12:11:02PM +0300, Andy Shevchenko wrote:
> > > 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 <andriy.shevchenko@linux.intel.com>
> > > ---
> > >  drivers/tty/serial/8250/8250_dma.c | 4 +---
> > >  1 file changed, 1 insertion(+), 3 deletions(-)
> > > 
> > > diff --git a/drivers/tty/serial/8250/8250_dma.c b/drivers/tty/serial/8250/8250_dma.c
> > > index d99020fd3427..b85c82616e8c 100644
> > > --- a/drivers/tty/serial/8250/8250_dma.c
> > > +++ b/drivers/tty/serial/8250/8250_dma.c
> > > @@ -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);
> > > -- 
> > > 2.35.1
> > > 
> > 
> > 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?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v1 1/1] serial: 8250_dma: Convert to use uart_xmit_advance()
  2022-09-22 14:33     ` Greg Kroah-Hartman
@ 2022-09-22 15:03       ` Andy Shevchenko
  2022-09-25  7:28         ` Greg Kroah-Hartman
  0 siblings, 1 reply; 8+ messages in thread
From: Andy Shevchenko @ 2022-09-22 15:03 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Ilpo Järvinen, linux-serial, LKML, Jiri Slaby

On Thu, Sep 22, 2022 at 04:33:45PM +0200, Greg Kroah-Hartman wrote:
> On Thu, Sep 22, 2022 at 05:24:55PM +0300, Ilpo Järvinen wrote:
> > On Thu, 22 Sep 2022, Greg Kroah-Hartman wrote:
> > > On Fri, Sep 09, 2022 at 12:11:02PM +0300, Andy Shevchenko wrote:

...

> > > 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.

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v1 1/1] serial: 8250_dma: Convert to use uart_xmit_advance()
  2022-09-22 15:03       ` Andy Shevchenko
@ 2022-09-25  7:28         ` Greg Kroah-Hartman
  0 siblings, 0 replies; 8+ messages in thread
From: Greg Kroah-Hartman @ 2022-09-25  7:28 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: Ilpo Järvinen, linux-serial, LKML, Jiri Slaby

On Thu, Sep 22, 2022 at 06:03:04PM +0300, Andy Shevchenko wrote:
> On Thu, Sep 22, 2022 at 04:33:45PM +0200, Greg Kroah-Hartman wrote:
> > On Thu, Sep 22, 2022 at 05:24:55PM +0300, Ilpo Järvinen wrote:
> > > On Thu, 22 Sep 2022, Greg Kroah-Hartman wrote:
> > > > On Fri, Sep 09, 2022 at 12:11:02PM +0300, Andy Shevchenko wrote:
> 
> ...
> 
> > > > 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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-09-25  7:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-09  9:11 [PATCH v1 1/1] serial: 8250_dma: Convert to use uart_xmit_advance() Andy Shevchenko
2022-09-09  9:16 ` Ilpo Järvinen
2022-09-09 10:17   ` Andy Shevchenko
2022-09-22 14:10 ` Greg Kroah-Hartman
2022-09-22 14:24   ` Ilpo Järvinen
2022-09-22 14:33     ` Greg Kroah-Hartman
2022-09-22 15:03       ` Andy Shevchenko
2022-09-25  7:28         ` Greg Kroah-Hartman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.