Re: Uartlite - ulite_transmit

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

 



Hi Peter, [cc: Grant]

I have found one thing which I would like to check with you.
It is about mdm console which is uartlite compatible but it is slow.
The problem which I think it is there is in ulite_transmit function if
TXFULL is reported then it was returned 0. ulite_transmit is called from
do-while loop in ulite_isr (shown below).

    do {
        int stat = readb(port->membase + ULITE_STATUS);
        busy  = ulite_receive(port, stat);
        busy |= ulite_transmit(port, stat);
    } while (busy);

If tx is full then loop ends but there could be a lot of characters
which need to be send that's why will be good to wait a little bit. I
think it could be done by returning 1 in that case.

What do you think? Patch is below.

Thanks,
Michal

P.S.: second email because c&p error.


diff --git a/drivers/serial/uartlite.c b/drivers/serial/uartlite.c
index ff5f248..cd2c94b 100644
--- a/drivers/serial/uartlite.c
+++ b/drivers/serial/uartlite.c
@@ -128,7 +128,7 @@ static int ulite_transmit(struct uart_port *port,
int stat)
        struct circ_buf *xmit  = &port->info->xmit;

        if (stat & ULITE_STATUS_TXFULL)
-               return 0;
+               return 1;

        if (port->x_char) {
                writeb(port->x_char, port->membase + ULITE_TX);



--
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" 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]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux