]> git.pld-linux.org Git - packages/kernel.git/blame - 2.6.1-modular-ide-lkml.patch
- obsolete
[packages/kernel.git] / 2.6.1-modular-ide-lkml.patch
CommitLineData
86f1adec 1diff -puN drivers/block/ll_rw_blk.c~modular-ide-fix drivers/block/ll_rw_blk.c
2--- linux-2.6.1/drivers/block/ll_rw_blk.c~modular-ide-fix 2004-01-18 20:45:38.984746320 +0100
3+++ linux-2.6.1-root/drivers/block/ll_rw_blk.c 2004-01-18 20:45:39.026739936 +0100
4@@ -146,6 +146,8 @@ void blk_queue_activity_fn(request_queue
5 q->activity_data = data;
6 }
7
8+EXPORT_SYMBOL(blk_queue_activity_fn);
9+
10 /**
11 * blk_queue_prep_rq - set a prepare_request function for queue
12 * @q: queue
13diff -puN drivers/ide/Makefile~modular-ide-fix drivers/ide/Makefile
14--- linux-2.6.1/drivers/ide/Makefile~modular-ide-fix 2004-01-18 20:45:38.990745408 +0100
15+++ linux-2.6.1-root/drivers/ide/Makefile 2004-01-18 20:50:48.661668272 +0100
16@@ -10,22 +10,39 @@
17 # First come modules that register themselves with the core
18 obj-$(CONFIG_BLK_DEV_IDE) += pci/
19
20+ide-core-y += ide.o ide-default.o ide-io.o ide-iops.o ide-lib.o ide-probe.o \
21+ ide-taskfile.o
22+
23+ide-core-$(CONFIG_BLK_DEV_CMD640) += pci/cmd640.o
24+
25 # Core IDE code - must come before legacy
26+ide-core-$(CONFIG_BLK_DEV_IDEPCI) += setup-pci.o
27+ide-core-$(CONFIG_BLK_DEV_IDEDMA_PCI) += ide-dma.o
28+ide-core-$(CONFIG_BLK_DEV_IDE_TCQ) += ide-tcq.o
29+ide-core-$(CONFIG_PROC_FS) += ide-proc.o
30+ide-core-$(CONFIG_BLK_DEV_IDEPNP) += ide-pnp.o
31+
32+# built-in only drivers from legacy/
33+ide-core-$(CONFIG_BLK_DEV_IDE_PC9800) += pc9800.o
34+ide-core-$(CONFIG_BLK_DEV_PDC4030) += pdc4030.o
35+ide-core-$(CONFIG_BLK_DEV_BUDDHA) += buddha.o
36+ide-core-$(CONFIG_BLK_DEV_FALCON_IDE) += falconide.o
37+ide-core-$(CONFIG_BLK_DEV_GAYLE) += gayle.o
38+ide-core-$(CONFIG_BLK_DEV_MAC_IDE) += macide.o
39+ide-core-$(CONFIG_BLK_DEV_Q40IDE) += q40ide.o
40+
41+# built-in only drivers from ppc/
42+ide-core-$(CONFIG_BLK_DEV_MPC8xx_IDE) += mpc8xx.o
43+ide-core-$(CONFIG_BLK_DEV_IDE_PMAC) += pmac.o
44+ide-core-$(CONFIG_BLK_DEV_IDE_SWARM) += swarm.o
45+
46+obj-$(CONFIG_BLK_DEV_IDE) += ide-core.o
47+obj-$(CONFIG_IDE_GENERIC) += ide-generic.o
48
49-obj-$(CONFIG_BLK_DEV_IDE) += ide-io.o ide-probe.o ide-iops.o ide-taskfile.o ide.o ide-lib.o ide-default.o
50 obj-$(CONFIG_BLK_DEV_IDEDISK) += ide-disk.o
51 obj-$(CONFIG_BLK_DEV_IDECD) += ide-cd.o
52 obj-$(CONFIG_BLK_DEV_IDETAPE) += ide-tape.o
53 obj-$(CONFIG_BLK_DEV_IDEFLOPPY) += ide-floppy.o
54
55-obj-$(CONFIG_BLK_DEV_IDEPCI) += setup-pci.o
56-obj-$(CONFIG_BLK_DEV_IDEDMA_PCI) += ide-dma.o
57-obj-$(CONFIG_BLK_DEV_IDE_TCQ) += ide-tcq.o
58-obj-$(CONFIG_BLK_DEV_IDEPNP) += ide-pnp.o
59-
60-ifeq ($(CONFIG_BLK_DEV_IDE),y)
61-obj-$(CONFIG_PROC_FS) += ide-proc.o
62-endif
63-
64-obj-$(CONFIG_BLK_DEV_IDE) += legacy/ ppc/ arm/
65+obj-$(CONFIG_BLK_DEV_IDE) += legacy/ arm/
66 obj-$(CONFIG_BLK_DEV_HD) += legacy/
67diff -puN drivers/ide/legacy/Makefile~modular-ide-fix drivers/ide/legacy/Makefile
68--- linux-2.6.1/drivers/ide/legacy/Makefile~modular-ide-fix 2004-01-18 20:45:38.993744952 +0100
69+++ linux-2.6.1-root/drivers/ide/legacy/Makefile 2004-01-18 20:45:39.028739632 +0100
70@@ -2,17 +2,9 @@
71 obj-$(CONFIG_BLK_DEV_ALI14XX) += ali14xx.o
72 obj-$(CONFIG_BLK_DEV_DTC2278) += dtc2278.o
73 obj-$(CONFIG_BLK_DEV_HT6560B) += ht6560b.o
74-obj-$(CONFIG_BLK_DEV_IDE_PC9800) += pc9800.o
75-obj-$(CONFIG_BLK_DEV_PDC4030) += pdc4030.o
76 obj-$(CONFIG_BLK_DEV_QD65XX) += qd65xx.o
77 obj-$(CONFIG_BLK_DEV_UMC8672) += umc8672.o
78
79-obj-$(CONFIG_BLK_DEV_BUDDHA) += buddha.o
80-obj-$(CONFIG_BLK_DEV_FALCON_IDE) += falconide.o
81-obj-$(CONFIG_BLK_DEV_GAYLE) += gayle.o
82-obj-$(CONFIG_BLK_DEV_MAC_IDE) += macide.o
83-obj-$(CONFIG_BLK_DEV_Q40IDE) += q40ide.o
84-
85 obj-$(CONFIG_BLK_DEV_IDECS) += ide-cs.o
86
87 # Last of all
88diff -puN drivers/ide/pci/Makefile~modular-ide-fix drivers/ide/pci/Makefile
89--- linux-2.6.1/drivers/ide/pci/Makefile~modular-ide-fix 2004-01-18 20:45:38.997744344 +0100
90+++ linux-2.6.1-root/drivers/ide/pci/Makefile 2004-01-18 20:45:39.029739480 +0100
91@@ -3,7 +3,6 @@ obj-$(CONFIG_BLK_DEV_ADMA100) += adma10
92 obj-$(CONFIG_BLK_DEV_AEC62XX) += aec62xx.o
93 obj-$(CONFIG_BLK_DEV_ALI15X3) += alim15x3.o
94 obj-$(CONFIG_BLK_DEV_AMD74XX) += amd74xx.o
95-obj-$(CONFIG_BLK_DEV_CMD640) += cmd640.o
96 obj-$(CONFIG_BLK_DEV_CMD64X) += cmd64x.o
97 obj-$(CONFIG_BLK_DEV_CS5520) += cs5520.o
98 obj-$(CONFIG_BLK_DEV_CS5530) += cs5530.o
99diff -puN -L drivers/ide/ppc/Makefile drivers/ide/ppc/Makefile~modular-ide-fix /dev/null
100--- linux-2.6.1/drivers/ide/ppc/Makefile
101+++ /dev/null 2004-01-17 00:25:55.000000000 +0100
102@@ -1,6 +0,0 @@
103-
104-obj-$(CONFIG_BLK_DEV_MPC8xx_IDE) += mpc8xx.o
105-obj-$(CONFIG_BLK_DEV_IDE_PMAC) += pmac.o
106-obj-$(CONFIG_BLK_DEV_IDE_SWARM) += swarm.o
107-
108-EXTRA_CFLAGS := -Idrivers/ide
109diff -puN drivers/ide/Kconfig~modular-ide-fix drivers/ide/Kconfig
110--- linux-2.6.1/drivers/ide/Kconfig~modular-ide-fix 2004-01-18 20:45:39.004743280 +0100
111+++ linux-2.6.1-root/drivers/ide/Kconfig 2004-01-18 20:45:39.031739176 +0100
112@@ -296,6 +296,12 @@ config IDE_TASKFILE_IO
113
114 comment "IDE chipset support/bugfixes"
115
116+config IDE_GENERIC
117+ tristate "generic/default IDE chipset support"
118+ default y
119+ help
120+ If unsure, say Y.
121+
122 config BLK_DEV_CMD640
123 bool "CMD640 chipset bugfix/support"
124 depends on X86
125diff -puN drivers/ide/ide.c~modular-ide-fix drivers/ide/ide.c
126--- linux-2.6.1/drivers/ide/ide.c~modular-ide-fix 2004-01-18 20:45:39.007742824 +0100
127+++ linux-2.6.1-root/drivers/ide/ide.c 2004-01-18 21:01:11.762942480 +0100
128@@ -153,7 +153,6 @@
129 #include <linux/cdrom.h>
130 #include <linux/seq_file.h>
131 #include <linux/device.h>
132-#include <linux/kmod.h>
133
134 #include <asm/byteorder.h>
135 #include <asm/irq.h>
136@@ -191,8 +190,6 @@ int noautodma = 1;
137 EXPORT_SYMBOL(noautodma);
138 EXPORT_SYMBOL(ide_bus_type);
139
140-int (*ide_probe)(void);
141-
142 /*
143 * This is declared extern in ide.h, for access by other IDE modules:
144 */
145@@ -443,21 +440,6 @@ u8 ide_dump_status (ide_drive_t *drive,
146
147 EXPORT_SYMBOL(ide_dump_status);
148
149-
150-
151-void ide_probe_module (void)
152-{
153- if (!ide_probe) {
154-#if defined(CONFIG_KMOD) && defined(CONFIG_BLK_DEV_IDE_MODULE)
155- (void) request_module("ide-probe-mod");
156-#endif /* (CONFIG_KMOD) && (CONFIG_BLK_DEV_IDE_MODULE) */
157- } else {
158- (void)ide_probe();
159- }
160-}
161-
162-EXPORT_SYMBOL(ide_probe_module);
163-
164 static int ide_open (struct inode * inode, struct file * filp)
165 {
166 return -ENXIO;
167@@ -1033,7 +1015,7 @@ found:
168 hwif->chipset = hw->chipset;
169
170 if (!initializing) {
171- ide_probe_module();
172+ probe_hwif_init(hwif);
173 #ifdef CONFIG_PROC_FS
174 create_proc_ide_interfaces();
175 #endif
176@@ -2282,28 +2264,6 @@ static void __init probe_for_hwifs (void
177 #endif /* CONFIG_BLK_DEV_IDEPNP */
178 }
179
180-void __init ide_init_builtin_drivers (void)
181-{
182- /*
183- * Probe for special PCI and other "known" interface chipsets
184- */
185- probe_for_hwifs ();
186-
187-#ifdef CONFIG_BLK_DEV_IDE
188- if (ide_hwifs[0].io_ports[IDE_DATA_OFFSET])
189- ide_get_lock(NULL, NULL); /* for atari only */
190-
191- (void) ideprobe_init();
192-
193- if (ide_hwifs[0].io_ports[IDE_DATA_OFFSET])
194- ide_release_lock(); /* for atari only */
195-#endif /* CONFIG_BLK_DEV_IDE */
196-
197-#ifdef CONFIG_PROC_FS
198- proc_ide_create();
199-#endif
200-}
201-
202 /*
203 * Actually unregister the subdriver. Called with the
204 * request lock dropped.
205@@ -2564,7 +2524,6 @@ EXPORT_SYMBOL(ide_fops);
206 */
207
208 EXPORT_SYMBOL(ide_lock);
209-EXPORT_SYMBOL(ide_probe);
210
211 struct bus_type ide_bus_type = {
212 .name = "ide",
213@@ -2607,9 +2566,13 @@ int __init ide_init (void)
214 #endif
215
216 initializing = 1;
217- ide_init_builtin_drivers();
218+ /* Probe for special PCI and other "known" interface chipsets. */
219+ probe_for_hwifs();
220 initializing = 0;
221
222+#ifdef CONFIG_PROC_FS
223+ proc_ide_create();
224+#endif
225 return 0;
226 }
227
228diff -puN /dev/null drivers/ide/ide-generic.c
229--- /dev/null 2004-01-17 00:25:55.000000000 +0100
230+++ linux-2.6.1-root/drivers/ide/ide-generic.c 2004-01-18 21:20:33.301361800 +0100
231@@ -0,0 +1,36 @@
232+/*
233+ * generic/default IDE host driver
234+ *
235+ * Copyright (C) 2004 Bartlomiej Zolnierkiewicz
236+ */
237+
238+#include <linux/kernel.h>
239+#include <linux/init.h>
240+#include <linux/module.h>
241+#include <linux/ide.h>
242+
243+static int __init ide_generic_init(void)
244+{
245+ MOD_INC_USE_COUNT;
246+ if (ide_hwifs[0].io_ports[IDE_DATA_OFFSET])
247+ ide_get_lock(NULL, NULL); /* for atari only */
248+
249+ (void)ideprobe_init();
250+
251+ if (ide_hwifs[0].io_ports[IDE_DATA_OFFSET])
252+ ide_release_lock(); /* for atari only */
253+
254+#ifdef CONFIG_PROC_FS
255+ create_proc_ide_interfaces();
256+#endif
257+ return 0;
258+}
259+
260+static void __exit ide_generic_exit(void)
261+{
262+}
263+
264+module_init(ide_generic_init);
265+module_exit(ide_generic_exit);
266+
267+MODULE_LICENSE("GPL");
268diff -puN drivers/ide/ide-probe.c~modular-ide-fix drivers/ide/ide-probe.c
269--- linux-2.6.1/drivers/ide/ide-probe.c~modular-ide-fix 2004-01-18 20:45:39.012742064 +0100
270+++ linux-2.6.1-root/drivers/ide/ide-probe.c 2004-01-18 21:16:19.570934688 +0100
271@@ -1322,8 +1322,7 @@ int ideprobe_init (void)
272 {
273 unsigned int index;
274 int probe[MAX_HWIFS];
275-
276- MOD_INC_USE_COUNT;
277+
278 memset(probe, 0, MAX_HWIFS * sizeof(int));
279 for (index = 0; index < MAX_HWIFS; ++index)
280 probe[index] = !ide_hwifs[index].present;
281@@ -1350,27 +1349,7 @@ int ideprobe_init (void)
282 ata_attach(&hwif->drives[unit]);
283 }
284 }
285- if (!ide_probe)
286- ide_probe = &ideprobe_init;
287- MOD_DEC_USE_COUNT;
288 return 0;
289 }
290
291-#ifdef MODULE
292-int init_module (void)
293-{
294- unsigned int index;
295-
296- for (index = 0; index < MAX_HWIFS; ++index)
297- ide_unregister(index);
298- ideprobe_init();
299- create_proc_ide_interfaces();
300- return 0;
301-}
302-
303-void cleanup_module (void)
304-{
305- ide_probe = NULL;
306-}
307-MODULE_LICENSE("GPL");
308-#endif /* MODULE */
309+EXPORT_SYMBOL_GPL(ideprobe_init);
310diff -puN include/linux/ide.h~modular-ide-fix include/linux/ide.h
311--- linux-2.6.1/include/linux/ide.h~modular-ide-fix 2004-01-18 20:45:39.019741000 +0100
312+++ linux-2.6.1-root/include/linux/ide.h 2004-01-18 20:45:39.044737200 +0100
313@@ -1231,7 +1231,6 @@ typedef struct ide_devices_s {
314 */
315 #ifndef _IDE_C
316 extern ide_hwif_t ide_hwifs[]; /* master data repository */
317-extern int (*ide_probe)(void);
318
319 extern ide_devices_t *idedisk;
320 extern ide_devices_t *idecd;
This page took 0.089618 seconds and 4 git commands to generate.