linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][2.6.10-rc2-bk9] 8250 fix for unconfigured FIFO size
@ 2004-11-26 20:14 Ian Abbott
  0 siblings, 0 replies; 3+ messages in thread
From: Ian Abbott @ 2004-11-26 20:14 UTC (permalink / raw)
  To: linux-serial; +Cc: Russell King

[-- 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;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH][2.6.10-rc2-bk9] 8250 fix for unconfigured FIFO size
@ 2004-11-26 21:30 Ian Abbott
  0 siblings, 0 replies; 3+ messages in thread
From: Ian Abbott @ 2004-11-26 21:30 UTC (permalink / raw)
  To: linux-serial; +Cc: Russell King

[-- Attachment #1: Type: text/plain, Size: 576 bytes --]

[Reposting due to Cc: address mix-up the first time!]

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: 776 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;


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH][2.6.10-rc2-bk9] 8250 fix for unconfigured FIFO size
@ 2004-11-26 21:32 Ian Abbott
  0 siblings, 0 replies; 3+ messages in thread
From: Ian Abbott @ 2004-11-26 21:32 UTC (permalink / raw)
  To: linux-serial; +Cc: Russell King

[-- Attachment #1: Type: text/plain, Size: 589 bytes --]

[Reposting due to Cc: address mix-up the first (and second) time!]

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: 776 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;


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-11-26 21:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-26 20:14 [PATCH][2.6.10-rc2-bk9] 8250 fix for unconfigured FIFO size Ian Abbott
  -- strict thread matches above, loose matches on Subject: below --
2004-11-26 21:30 Ian Abbott
2004-11-26 21:32 Ian Abbott

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).