From: Robert Baldyga Date: Mon, 24 Nov 2014 06:56:24 +0000 (+0100) Subject: serial: samsung: use port->fifosize instead of hardcoded values X-Git-Tag: v3.19-rc1~79^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=57850a50c1f91c6136fe0b4b27301ebbe848b2ce;p=thirdparty%2Flinux.git 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: Robert Baldyga Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c index 34db16715efc9..7ed76773c274f 100644 --- a/drivers/tty/serial/samsung.c +++ b/drivers/tty/serial/samsung.c @@ -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);