Found a bug in samsung serial tty code

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

 



Hi,

The function s3c24xx_serial_tx_empty() in tty/serial/samsung.c is wrong:

static unsigned int s3c24xx_serial_tx_empty(struct uart_port *port)
{
struct s3c24xx_uart_info *info = s3c24xx_port_to_info(port);
unsigned long ufstat = rd_regl(port, S3C2410_UFSTAT);
unsigned long ufcon = rd_regl(port, S3C2410_UFCON);

if (ufcon & S3C2410_UFCON_FIFOMODE) {
if ((ufstat & info->tx_fifomask) != 0 ||
   (ufstat & info->tx_fifofull))
return 0;

return 1;
}

return s3c24xx_serial_txempty_nofifo(port);
}

In FIFO mode, checking only ufcon is not enough to determine that the
tx is really done, since there is still bits in shift register.  I
found this is true at least in S3C2416 UARTs.  I have to remove the
'return 1' above to fix the bug.   Can anyone give me a confirmation?
Thanks!


-- 
Life is the only flaw in an otherwise perfect nonexistence
    -- Schopenhauer

woody
public key at http://subkeys.pgp.net:11371 (narkewoody@xxxxxxxxx)
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  Powered by Linux