From: Ian Abbott <abbotti@mev.co.uk>
To: linux-serial@vger.kernel.org
Cc: Russell King <rmk+serial@vger.kernel.org>
Subject: [PATCH][2.6.10-rc2-bk9] 8250 fix for unconfigured FIFO size
Date: Fri, 26 Nov 2004 20:14:45 +0000 [thread overview]
Message-ID: <41A78EB5.3020108@mev.co.uk> (raw)
[-- Attachment #1: Type: text/plain, Size: 522 bytes --]
Hi,
In the 8250 driver, for a serial port manually configured by setserial
(not using autoconfig), the FIFO size and the TX load size do not get
set. The attached patch fixes that. During UART startup, it sanitizes
the FIFO size and the TX load size.
This might also fix Alexandre Courbot's problem (which I suspect is due
to the old FIFO size being remembered):
> Subject: Bug with 2.6 serial driver when in UART 8250 mode
> Date: Thu, 19 Aug 2004 18:53:49 +0200
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
[-- Attachment #2: 8250_fifosize.patch --]
[-- Type: text/x-patch, Size: 775 bytes --]
diff -urN linux-2.6.10-rc2-bk9/drivers/serial/8250.c linux-2.6.10-rc2-bk9-ia/drivers/serial/8250.c
--- linux-2.6.10-rc2-bk9/drivers/serial/8250.c 2004-11-26 17:26:45.571917552 +0000
+++ linux-2.6.10-rc2-bk9-ia/drivers/serial/8250.c 2004-11-26 19:59:50.614578824 +0000
@@ -1359,6 +1359,14 @@
up->capabilities = uart_config[up->port.type].flags;
up->mcr = 0;
+ if (up->port.fifosize <= 0 ||
+ up->port.fifosize > uart_config[up->port.type].fifo_size)
+ up->port.fifosize = uart_config[up->port.type].fifo_size;
+ if (up->tx_loadsz == 0)
+ up->tx_loadsz = uart_config[up->port.type].tx_loadsz;
+ if (up->tx_loadsz > up->port.fifosize)
+ up->tx_loadsz = up->port.fifosize;
+
if (up->port.type == PORT_16C950) {
/* Wake up and initialize UART */
up->acr = 0;
next reply other threads:[~2004-11-26 20:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-26 20:14 Ian Abbott [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-11-26 21:30 [PATCH][2.6.10-rc2-bk9] 8250 fix for unconfigured FIFO size Ian Abbott
2004-11-26 21:32 Ian Abbott
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=41A78EB5.3020108@mev.co.uk \
--to=abbotti@mev.co.uk \
--cc=linux-serial@vger.kernel.org \
--cc=rmk+serial@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).