lkml.org 
[lkml]   [1996]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectPatches for the serial driver (versus 2.1.9)


Enclosed please find patches against the serial driver. The patches are
against 2.1.9, but they will work against 2.1.8.

This patch should fix the automatic IRQ lossage in 2.1.8 and 2.1.9.
This I believe fixed most of the reported problems, including the ones
where setting the UART to be a 16550A instead of a 16450 solved the
problem since that allowed enough of a buffer on the UART for it to
function w/o interrupts.

Note, though, that if you have a 16550A, it's **bad** to have setserial
set the uart type to be a 16450, since that degrades your normal
performance. I don't know why people had this in their rc.serial, but
it was a bad thing.

Many thanks to those of you who took the time to send a complete bug
report, and took the time to research your ssytem and give me useful
information towards actually diagnosing the problem.

I've also tried to make a more paranoid strategy for the TI 16750
detection. It appears that the National Semiconductor specification
sheet lied when they said that all NS16550A's would return a zero in bit
position 6 of the IIR; apparently some new 16550A's do allow you to set
that bit in the IIR, and that was confusing the Linux kernel to
autodetect some 16550A UART's as 16750.

If the people who were reporting this problem to me could let me know
whether this patch fixes their problem, I would be most obliged.
Thanks!!

Linus, please feel free to integrate this patch into your next release.

- Ted


Patch generated: on Thu Nov 14 00:08:14 EST 1996 by tytso@rsts-11.mit.edu
against Linux version 2.1.9

===================================================================
RCS file: drivers/char/RCS/ChangeLog,v
retrieving revision 1.1
diff -u -r1.1 drivers/char/ChangeLog
--- drivers/char/ChangeLog 1996/11/14 05:05:37 1.1
+++ drivers/char/ChangeLog 1996/11/14 05:07:29
@@ -1,3 +1,9 @@
+Thu Nov 14 00:06:09 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
+
+ * serial.c (autoconfig): Fix autoconfiguration problems;
+ info->flags wasn't getting initialized from the state
+ structure. Put in more paranoid test for the 16750.
+
Fri Nov 8 20:19:50 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>

* n_tty.c (n_tty_flush_buffer): Only call driver->unthrottle() if
===================================================================
RCS file: drivers/char/RCS/serial.c,v
retrieving revision 1.1
diff -u -r1.1 drivers/char/serial.c
--- drivers/char/serial.c 1996/11/13 18:34:41 1.1
+++ drivers/char/serial.c 1996/11/14 05:07:58
@@ -50,7 +50,7 @@
#include <asm/bitops.h>

static char *serial_name = "Serial driver";
-static char *serial_version = "4.20";
+static char *serial_version = "4.21";

DECLARE_TASK_QUEUE(tq_serial);

@@ -2687,7 +2687,7 @@
(void)serial_inp(info, UART_IIR);
(void)serial_inp(info, UART_MSR);

- timeout = jiffies+2*HZ/100;
+ timeout = jiffies+ ((2*HZ)/100);
while (timeout >= jiffies) {
if (rs_irq_triggered)
break;
@@ -2758,7 +2758,9 @@
if (!state->port)
return;
info = &scr_info; /* This is just for serial_{in,out} */
- info->port = state->port;
+ info->magic = SERIAL_MAGIC;
+ info->port = state->port;
+ info->flags = state->flags;

save_flags(flags); cli();

@@ -2848,8 +2850,13 @@
serial_outp(info, UART_FCR,
UART_FCR_ENABLE_FIFO | UART_FCR7_64BYTE);
scratch = serial_in(info, UART_IIR) >> 5;
- if (scratch == 7)
- state->type = PORT_16750;
+ if (scratch == 7) {
+ serial_outp(info, UART_LCR, 0);
+ serial_outp(info, UART_FCR, UART_FCR_ENABLE_FIFO);
+ scratch = serial_in(info, UART_IIR) >> 5;
+ if (scratch == 7)
+ state->type = PORT_16750;
+ }
serial_outp(info, UART_FCR, UART_FCR_ENABLE_FIFO);
}
serial_outp(info, UART_LCR, scratch2);
\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.047 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site