]>
Commit | Line | Data |
---|---|---|
d69bae79 SZ |
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 | |
4 | @@ -54,6 +54,12 @@ | |
5 | * 7/00: fix some returns on failure not using MOD_DEC_USE_COUNT. | |
6 | * Arnaldo Carvalho de Melo <acme@conectiva.com.br> | |
7 | * | |
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.) | |
13 | + * | |
14 | * This module exports the following rs232 io functions: | |
15 | * | |
16 | * int rs_init(void); | |
17 | @@ -5116,6 +5122,10 @@ | |
18 | ||
19 | #endif /* ENABLE_SERIAL_PNP */ | |
20 | ||
21 | +#ifdef SERIAL_FIX_MULTIPLE_INIT | |
22 | +static int serial_initialized __initdata = 0; | |
23 | +#endif | |
24 | + | |
25 | /* | |
26 | * The serial driver boot-time initialization code! | |
27 | */ | |
28 | @@ -5124,6 +5134,11 @@ | |
29 | int i; | |
30 | struct serial_state * state; | |
31 | ||
32 | +#ifdef SERIAL_FIX_MULTIPLE_INIT | |
33 | + if (serial_initialized) | |
34 | + return 0; | |
35 | + serial_initialized = 1; | |
36 | +#endif | |
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 | |
43 | @@ -201,6 +201,14 @@ | |
44 | #define module_init(x) /* nothing */ | |
45 | #define module_exit(x) /* nothing */ | |
46 | #endif | |
47 | +#else | |
48 | +#ifndef MODULE | |
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 | |
52 | +#endif | |
53 | +/* XXX May need to check 2.3.x series kernels for the same problem. */ | |
54 | +#endif | |
55 | #endif /* module_init */ | |
56 | ||
57 | ||
58 | @@ -387,6 +395,9 @@ | |
59 | ||
60 | #ifndef PCI_VENDOR_ID_OXSEMI | |
61 | #define PCI_VENDOR_ID_OXSEMI 0x1415 | |
62 | +#endif | |
63 | + | |
64 | +#ifndef PCI_DEVICE_ID_OXSEMI_16PCI954 | |
65 | #define PCI_DEVICE_ID_OXSEMI_16PCI954 0x9501 | |
66 | #endif | |
67 |