+ atmel_serial-avoid-stopping-pdc-during-transmission-update.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     atmel_serial-avoid-stopping-pdc-during-transmission update
has been added to the -mm tree.  Its filename is
     atmel_serial-avoid-stopping-pdc-during-transmission-update.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: atmel_serial-avoid-stopping-pdc-during-transmission update
From: Michael Trimarchi <trimarchimichael@xxxxxxxx>

I try to do more tests to the serial driver and I adjust my patch, because it has problem when the pending dma
transfer contain a lot of bytes ( I can't wait a lot ).
When we have pending trasmission and we are in the tasklet, we wait for long time (9600 bps
and and xmit size equal to a XMIT_SIZE for example ) but the wakeup event of the tasklet happen for a "receive event" 
so we first receive the bytes in the pdc buffer. The driver wiil receive an interrupt later at the end of pdc transmission.
The same things happen when we are in interrupt mode. So I suppose that with the latest patch we have:

- tx_dma & rx_dma works on heavy load, slow rate and high rate
- interrupt tx & rx_dma does't work on heavy load because it spend a lot of time for trasmission
- interrupt tx & interrupt tx does't work on heavy load

Possible solutions when using interrupt tx can be:
- increase the buffering ( I don't like it )
- avoid long transmit phase

Cc: Haavard Skinnemoen <hskinnemoen@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/serial/atmel_serial.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff -puN drivers/serial/atmel_serial.c~atmel_serial-avoid-stopping-pdc-during-transmission-update drivers/serial/atmel_serial.c
--- a/drivers/serial/atmel_serial.c~atmel_serial-avoid-stopping-pdc-during-transmission-update
+++ a/drivers/serial/atmel_serial.c
@@ -563,6 +563,10 @@ static void atmel_tx_dma(struct uart_por
 	struct atmel_dma_buffer *pdc = &atmel_port->pdc_tx;
 	int count;
 
+	/* nothing left to transmit? */
+	if (UART_GET_TCR(port))
+		return;
+
 	xmit->tail += pdc->ofs;
 	xmit->tail &= UART_XMIT_SIZE - 1;
 
@@ -571,10 +575,6 @@ static void atmel_tx_dma(struct uart_por
 
 	/* more to transmit - setup next transfer */
 
-	/* nothing left to transmit? */
-	while (UART_GET_TCR(port))
-		cpu_relax();
-
 	/* disable PDC transmit */
 	UART_PUT_PTCR(port, ATMEL_PDC_TXTDIS);
 
_

Patches currently in -mm which might be from trimarchimichael@xxxxxxxx are

atmel_serial-avoid-stopping-pdc-during-transmission.patch
atmel_serial-avoid-stopping-pdc-during-transmission-update.patch
jffs2-add-write-verify-on-dataflash.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux