Skip to contentSkip to conversation

serial: 8250_dma: call serial8250_tx_dma unconditionally

PATCH Superseded Andy Shevchenko 3 participants 4 messages Oct 8, 2014 – Nov 6, 2014 TTY layer and serial drivers

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 serial: 8250_dma: call serial8250_tx_dma unconditionally

Since we have the same check inside the function we may drop it away in __dma_tx_complete().

---
 drivers/tty/serial/8250/8250_dma.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/tty/serial/8250/8250_dma.c +1 -2
index 148ffe4..189ae3c 100644
@@ -36,8 +36,7 @@ static void __dma_tx_complete(void *param)
 	if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
 		uart_write_wakeup(&p->port);
 
-	if (!uart_circ_empty(xmit) && !uart_tx_stopped(&p->port))
-		serial8250_tx_dma(p);
+	serial8250_tx_dma(p);
 
 	spin_unlock_irqrestore(&p->port.lock, flags);
 }
Signature · 1 line
2.1.1
#2 lore raw
In reply to Andy Shevchenko
Quoted 14 lines · Andy Shevchenko

Since we have the same check inside the function we may drop it away in __dma_tx_complete().

---
 drivers/tty/serial/8250/8250_dma.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/tty/serial/8250/8250_dma.c +0 -0
index 148ffe4..189ae3c 100644

drivers/tty/serial/8250/8250_dma.c static void __dma_tx_complete(void *param) · line 42

Quoted 9 lines
drivers/tty/serial/8250/8250_dma.c +1 -2
@@ -36,8 +36,7 @@ static void __dma_tx_complete(void *param)
 	if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
 		uart_write_wakeup(&p->port);
 
-	if (!uart_circ_empty(xmit) && !uart_tx_stopped(&p->port))
-		serial8250_tx_dma(p);
+	serial8250_tx_dma(p);
 
 	spin_unlock_irqrestore(&p->port.lock, flags);
 }

The code in this area has changed a lot now due to some dma work added to this driver. Can you look at my tty-testing branch of tty.git on git.kernel.org and see if this is still relevant now? If so, please refresh this patch and resend.

thanks,

greg k-h

#3 lore raw
Quoted 22 lines · Greg Kroah-Hartman
Quoted 21 lines · Andy Shevchenko

Since we have the same check inside the function we may drop it away in __dma_tx_complete().

---
 drivers/tty/serial/8250/8250_dma.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/tty/serial/8250/8250_dma.c +1 -2
index 148ffe4..189ae3c 100644
@@ -36,8 +36,7 @@ static void __dma_tx_complete(void *param)
 	if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
 		uart_write_wakeup(&p->port);
 
-	if (!uart_circ_empty(xmit) && !uart_tx_stopped(&p->port))
-		serial8250_tx_dma(p);
+	serial8250_tx_dma(p);
 
Quoted 6 lines

drivers/tty/serial/8250/8250_dma.c static void __dma_tx_complete(void *param) · line 42

Quoted 2 lines
drivers/tty/serial/8250/8250_dma.c +0 -0
 	spin_unlock_irqrestore(&p->port.lock, flags);
 }

The code in this area has changed a lot now due to some dma work added to this driver. Can you look at my tty-testing branch of tty.git on git.kernel.org and see if this is still relevant now?

Yes, it is. I will create a patch and resend soon.

Heikki, I'm not going to apply your Reviewed-by because of those changes Greg mentioned. Please, review again when I submit it.

Quoted 6 lines

If so, please
refresh this patch and resend.

thanks,

greg k-h

Signature · 2 lines
Andy Shevchenko <[email protected]>
Intel Finland Oy