]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
serial: samsung: use port->fifosize instead of hardcoded values
authorRobert Baldyga <r.baldyga@samsung.com>
Mon, 24 Nov 2014 06:56:24 +0000 (07:56 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Nov 2014 01:06:40 +0000 (17:06 -0800)
Hardcoded FIFO size can cause hardware performance limitation.
Using real size value provides better FIFO usage.

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/samsung.c

index 34db16715efc90e4cb760b27d198ca9c6e74d3a1..7ed76773c274fdf471c0a67f4cf266316a2907db 100644 (file)
@@ -239,7 +239,7 @@ s3c24xx_serial_rx_chars(int irq, void *dev_id)
        struct uart_port *port = &ourport->port;
        unsigned int ufcon, ch, flag, ufstat, uerstat;
        unsigned long flags;
-       int max_count = 64;
+       int max_count = port->fifosize;
 
        spin_lock_irqsave(&port->lock, flags);
 
@@ -330,7 +330,7 @@ static irqreturn_t s3c24xx_serial_tx_chars(int irq, void *id)
        struct uart_port *port = &ourport->port;
        struct circ_buf *xmit = &port->state->xmit;
        unsigned long flags;
-       int count = 256;
+       int count = port->fifosize;
 
        spin_lock_irqsave(&port->lock, flags);