1 diff -uNr serial-5.05/serial.c serial-5.05-fix2.2.18/serial.c
2 --- serial-5.05/serial.c Thu Sep 14 17:40:26 2000
3 +++ serial-5.05-fix2.2.18/serial.c Mon Feb 19 18:05:39 2001
5 * 7/00: fix some returns on failure not using MOD_DEC_USE_COUNT.
6 * Arnaldo Carvalho de Melo <acme@conectiva.com.br>
8 + * 2/01: Fixes for kernel 2.2.18:
9 + * Isolated compatibility #define for PCI_DEVICE_ID_OXSEMI_PCI954.
10 + * Ignore extra calls to rs_init from tty_io.c or wherever during
11 + * initialization. Ian Abbott <abbotti@mev.co.uk> (N.B. others found
12 + * the bugs - I just localized the patches to the serial driver.)
14 * This module exports the following rs232 io functions:
17 @@ -5116,6 +5122,10 @@
19 #endif /* ENABLE_SERIAL_PNP */
21 +#ifdef SERIAL_FIX_MULTIPLE_INIT
22 +static int serial_initialized __initdata = 0;
26 * The serial driver boot-time initialization code!
28 @@ -5124,6 +5134,11 @@
30 struct serial_state * state;
32 +#ifdef SERIAL_FIX_MULTIPLE_INIT
33 + if (serial_initialized)
35 + serial_initialized = 1;
37 init_bh(SERIAL_BH, do_serial_bh);
38 init_timer(&serial_timer);
39 serial_timer.function = rs_timer;
40 diff -uNr serial-5.05/serial_compat.h serial-5.05-fix2.2.18/serial_compat.h
41 --- serial-5.05/serial_compat.h Thu Sep 14 16:16:06 2000
42 +++ serial-5.05-fix2.2.18/serial_compat.h Mon Feb 19 17:53:17 2001
44 #define module_init(x) /* nothing */
45 #define module_exit(x) /* nothing */
49 +/* Deal with crash caused by multiple calls of rs_init in kernel 2.2.x>=18 */
50 +#if (LINUX_VERSION_CODE >= 0x020212) && (LINUX_VERSION_CODE < 0x020300)
51 +#define SERIAL_FIX_MULTIPLE_INIT
53 +/* XXX May need to check 2.3.x series kernels for the same problem. */
55 #endif /* module_init */
60 #ifndef PCI_VENDOR_ID_OXSEMI
61 #define PCI_VENDOR_ID_OXSEMI 0x1415
64 +#ifndef PCI_DEVICE_ID_OXSEMI_16PCI954
65 #define PCI_DEVICE_ID_OXSEMI_16PCI954 0x9501