From f01e26246e2a60eb89fc5d9950fffb98464c0f78 Mon Sep 17 00:00:00 2001 From: Robert Baldyga Date: Mon, 24 Nov 2014 07:56:24 +0100 Subject: [PATCH] [COMMON] 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. Change-Id: Ie7d99d6b3661db60f1ae039ddfbd7d80f3fdc8b1 Signed-off-by: Robert Baldyga Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/samsung.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c index acc080eecb92..c11d76a756b0 100644 --- a/drivers/tty/serial/samsung.c +++ b/drivers/tty/serial/samsung.c @@ -386,7 +386,7 @@ s3c24xx_serial_rx_chars(int irq, void *dev_id) unsigned int ufcon, ch, flag, ufstat, uerstat; unsigned long flags; int fifocnt = 0; - int max_count = 64; + int max_count = port->fifosize; spin_lock_irqsave(&port->lock, flags); @@ -484,7 +484,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); -- 2.20.1