patch-2.1.10 linux/drivers/char/serial.c
Next file: linux/drivers/isdn/teles/proto.h
Previous file: linux/drivers/char/ChangeLog
Back to the patch index
Back to the overall index
- Lines: 45
- Date:
Thu Nov 14 09:28:45 1996
- Orig file:
v2.1.9/linux/drivers/char/serial.c
- Orig date:
Sun Nov 10 20:12:11 1996
diff -u --recursive --new-file v2.1.9/linux/drivers/char/serial.c linux/drivers/char/serial.c
@@ -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);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov