Skip to content

Commit

Permalink
serial: samsung: use port->fifosize instead of hardcoded values
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Robert Baldyga authored and Greg Kroah-Hartman committed Nov 26, 2014
1 parent 2f1ba72 commit 57850a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/tty/serial/samsung.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 57850a5

Please sign in to comment.