Commit 57850a50 authored by Robert Baldyga's avatar Robert Baldyga Committed by Greg Kroah-Hartman

serial: samsung: use port->fifosize instead of hardcoded values

Hardcoded FIFO size can cause hardware performance limitation.
Using real size value provides better FIFO usage.
Signed-off-by: default avatarRobert Baldyga <r.baldyga@samsung.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2f1ba72d
...@@ -239,7 +239,7 @@ s3c24xx_serial_rx_chars(int irq, void *dev_id) ...@@ -239,7 +239,7 @@ s3c24xx_serial_rx_chars(int irq, void *dev_id)
struct uart_port *port = &ourport->port; struct uart_port *port = &ourport->port;
unsigned int ufcon, ch, flag, ufstat, uerstat; unsigned int ufcon, ch, flag, ufstat, uerstat;
unsigned long flags; unsigned long flags;
int max_count = 64; int max_count = port->fifosize;
spin_lock_irqsave(&port->lock, flags); spin_lock_irqsave(&port->lock, flags);
...@@ -330,7 +330,7 @@ static irqreturn_t s3c24xx_serial_tx_chars(int irq, void *id) ...@@ -330,7 +330,7 @@ static irqreturn_t s3c24xx_serial_tx_chars(int irq, void *id)
struct uart_port *port = &ourport->port; struct uart_port *port = &ourport->port;
struct circ_buf *xmit = &port->state->xmit; struct circ_buf *xmit = &port->state->xmit;
unsigned long flags; unsigned long flags;
int count = 256; int count = port->fifosize;
spin_lock_irqsave(&port->lock, flags); spin_lock_irqsave(&port->lock, flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment