]> git.pld-linux.org Git - packages/kernel.git/blame - 2.6.0-t11-ide3.patch
- update for cset 20040707_...
[packages/kernel.git] / 2.6.0-t11-ide3.patch
CommitLineData
14ccec22 1 drivers/block/ll_rw_blk.c | 2 ++
2 drivers/ide/Makefile | 16 ++++++++--------
3 drivers/ide/ide-probe-mini.c | 23 +++++++++++++++++++++++
4 drivers/ide/ide-probe.c | 20 +++++++++++++-------
5 drivers/ide/ide.c | 35 ++++++++---------------------------
6 include/linux/ide.h | 1 -
7 6 files changed, 54 insertions(+), 43 deletions(-)
8
9diff -puN drivers/block/ll_rw_blk.c~ide-modules drivers/block/ll_rw_blk.c
10--- linux-2.6.0-test11-bart1/drivers/block/ll_rw_blk.c~ide-modules 2003-12-12 23:49:03.361002480 +0100
11+++ linux-2.6.0-test11-bart1-root/drivers/block/ll_rw_blk.c 2003-12-12 23:49:03.385998680 +0100
12@@ -145,6 +145,8 @@ void blk_queue_activity_fn(request_queue
13 q->activity_data = data;
14 }
15
16+EXPORT_SYMBOL(blk_queue_activity_fn);
17+
18 /**
19 * blk_queue_prep_rq - set a prepare_request function for queue
20 * @q: queue
21diff -puN drivers/ide/ide.c~ide-modules drivers/ide/ide.c
22--- linux-2.6.0-test11-bart1/drivers/ide/ide.c~ide-modules 2003-12-12 23:49:03.373000656 +0100
23+++ linux-2.6.0-test11-bart1-root/drivers/ide/ide.c 2003-12-12 23:50:10.433805864 +0100
24@@ -189,9 +189,6 @@ int noautodma = 1;
25 #endif
26
27 EXPORT_SYMBOL(noautodma);
28-EXPORT_SYMBOL(ide_bus_type);
29-
30-int (*ide_probe)(void);
31
32 /*
33 * This is declared extern in ide.h, for access by other IDE modules:
34@@ -313,6 +310,8 @@ static void __init init_ide_data (void)
35 for (index = 0; index < MAX_HWIFS; ++index)
36 init_hwif_data(index);
37
38+ initializing = 1;
39+
40 /* Add default hw interfaces */
41 ide_init_default_hwifs();
42
43@@ -443,21 +442,6 @@ u8 ide_dump_status (ide_drive_t *drive,
44
45 EXPORT_SYMBOL(ide_dump_status);
46
47-
48-
49-void ide_probe_module (void)
50-{
51- if (!ide_probe) {
52-#if defined(CONFIG_KMOD) && defined(CONFIG_BLK_DEV_IDE_MODULE)
53- (void) request_module("ide-probe-mod");
54-#endif /* (CONFIG_KMOD) && (CONFIG_BLK_DEV_IDE_MODULE) */
55- } else {
56- (void)ide_probe();
57- }
58-}
59-
60-EXPORT_SYMBOL(ide_probe_module);
61-
62 static int ide_open (struct inode * inode, struct file * filp)
63 {
64 return -ENXIO;
65@@ -585,8 +569,6 @@ control_region_busy:
66 return -EBUSY;
67 }
68
69-EXPORT_SYMBOL(ide_hwif_request_regions);
70-
71 /**
72 * ide_hwif_release_regions - free IDE resources
73 *
74@@ -622,8 +604,6 @@ void ide_hwif_release_regions(ide_hwif_t
75 }
76 }
77
78-EXPORT_SYMBOL(ide_hwif_release_regions);
79-
80 extern void init_hwif_data(unsigned int index);
81
82 /**
83@@ -992,6 +972,8 @@ void ide_setup_ports ( hw_regs_t *hw,
84
85 EXPORT_SYMBOL(ide_setup_ports);
86
87+extern int ideprobe_init_module(void);
88+
89 /*
90 * Register an IDE interface, specifying exactly the registers etc
91 * Set init=1 iff calling before probes have taken place.
92@@ -1033,7 +1015,10 @@ found:
93 hwif->chipset = hw->chipset;
94
95 if (!initializing) {
96- ide_probe_module();
97+#ifdef MODULE
98+ if (ideprobe_init_module() == -EBUSY)
99+#endif
100+ ideprobe_init();
101 #ifdef CONFIG_PROC_FS
102 create_proc_ide_interfaces();
103 #endif
104@@ -1517,8 +1502,6 @@ int ata_attach(ide_drive_t *drive)
105 return 1;
106 }
107
108-EXPORT_SYMBOL(ata_attach);
109-
110 static int generic_ide_suspend(struct device *dev, u32 state)
111 {
112 ide_drive_t *drive = dev->driver_data;
113@@ -2558,7 +2541,6 @@ EXPORT_SYMBOL(ide_fops);
114 */
115
116 EXPORT_SYMBOL(ide_lock);
117-EXPORT_SYMBOL(ide_probe);
118
119 struct bus_type ide_bus_type = {
120 .name = "ide",
121@@ -2600,7 +2582,6 @@ int __init ide_init (void)
122 (void)qd65xx_init();
123 #endif
124
125- initializing = 1;
126 ide_init_builtin_drivers();
127 initializing = 0;
128
129diff -puN drivers/ide/ide-probe.c~ide-modules drivers/ide/ide-probe.c
130--- linux-2.6.0-test11-bart1/drivers/ide/ide-probe.c~ide-modules 2003-12-12 23:49:03.376000200 +0100
131+++ linux-2.6.0-test11-bart1-root/drivers/ide/ide-probe.c 2003-12-12 23:49:03.389998072 +0100
132@@ -1348,27 +1348,33 @@ int ideprobe_init (void)
133 ata_attach(&hwif->drives[unit]);
134 }
135 }
136- if (!ide_probe)
137- ide_probe = &ideprobe_init;
138 MOD_DEC_USE_COUNT;
139 return 0;
140 }
141
142 #ifdef MODULE
143-int init_module (void)
144+static int ideprobe_done;
145+
146+int ideprobe_init_module(void)
147 {
148 unsigned int index;
149-
150+
151+ if (ideprobe_done)
152+ return -EBUSY;
153+
154 for (index = 0; index < MAX_HWIFS; ++index)
155 ide_unregister(index);
156 ideprobe_init();
157 create_proc_ide_interfaces();
158+ ideprobe_done = 1;
159 return 0;
160 }
161
162-void cleanup_module (void)
163+EXPORT_SYMBOL_GPL(ideprobe_init_module);
164+
165+void ideprobe_cleanup_module(void)
166 {
167- ide_probe = NULL;
168 }
169-MODULE_LICENSE("GPL");
170+
171+EXPORT_SYMBOL_GPL(ideprobe_cleanup_module);
172 #endif /* MODULE */
173diff -puN /dev/null drivers/ide/ide-probe-mini.c
174--- /dev/null 2003-01-30 11:24:37.000000000 +0100
175+++ linux-2.6.0-test11-bart1-root/drivers/ide/ide-probe-mini.c 2003-12-12 23:49:03.389998072 +0100
176@@ -0,0 +1,23 @@
177+/*
178+ * linux/drivers/ide/ide-probe-mini.c Version 1
179+ *
180+ * Copyright (C) 1994-1998 Linus Torvalds & authors (see below)
181+ */
182+
183+#include <linux/config.h>
184+#include <linux/init.h>
185+#include <linux/module.h>
186+#include <linux/types.h>
187+#include <linux/string.h>
188+#include <linux/kernel.h>
189+#include <linux/kmod.h>
190+
191+#ifdef MODULE
192+extern int ideprobe_init_module(void);
193+extern void ideprobe_cleanup_module(void);
194+
195+module_init(ideprobe_init_module);
196+module_exit(ideprobe_cleanup_module);
197+
198+MODULE_LICENSE("GPL");
199+#endif
200diff -puN drivers/ide/Makefile~ide-modules drivers/ide/Makefile
201--- linux-2.6.0-test11-bart1/drivers/ide/Makefile~ide-modules 2003-12-12 23:49:03.378999744 +0100
202+++ linux-2.6.0-test11-bart1-root/drivers/ide/Makefile 2003-12-12 23:50:02.471016392 +0100
203@@ -10,22 +10,22 @@
204 # First come modules that register themselves with the core
205 obj-$(CONFIG_BLK_DEV_IDE) += pci/
206
207+ide-core-objs := ide-io.o ide-probe.o ide-iops.o ide-taskfile.o ide.o ide-lib.o ide-default.o
208+
209 # Core IDE code - must come before legacy
210+ide-core-$(CONFIG_BLK_DEV_IDEPCI) += setup-pci.o
211+ide-core-$(CONFIG_BLK_DEV_IDEDMA_PCI) += ide-dma.o
212+ide-core-$(CONFIG_BLK_DEV_IDE_TCQ) += ide-tcq.o
213+ide-core-$(CONFIG_PROC_FS) += ide-proc.o
214+
215+obj-$(CONFIG_BLK_DEV_IDE) += ide-core.o ide-probe-mini.o
216
217-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
218 obj-$(CONFIG_BLK_DEV_IDEDISK) += ide-disk.o
219 obj-$(CONFIG_BLK_DEV_IDECD) += ide-cd.o
220 obj-$(CONFIG_BLK_DEV_IDETAPE) += ide-tape.o
221 obj-$(CONFIG_BLK_DEV_IDEFLOPPY) += ide-floppy.o
222
223-obj-$(CONFIG_BLK_DEV_IDEPCI) += setup-pci.o
224-obj-$(CONFIG_BLK_DEV_IDEDMA_PCI) += ide-dma.o
225-obj-$(CONFIG_BLK_DEV_IDE_TCQ) += ide-tcq.o
226 obj-$(CONFIG_BLK_DEV_IDEPNP) += ide-pnp.o
227
228-ifeq ($(CONFIG_BLK_DEV_IDE),y)
229-obj-$(CONFIG_PROC_FS) += ide-proc.o
230-endif
231-
232 obj-$(CONFIG_BLK_DEV_IDE) += legacy/ ppc/ arm/
233 obj-$(CONFIG_BLK_DEV_HD) += legacy/
234diff -puN include/linux/ide.h~ide-modules include/linux/ide.h
235--- linux-2.6.0-test11-bart1/include/linux/ide.h~ide-modules 2003-12-12 23:49:03.381999288 +0100
236+++ linux-2.6.0-test11-bart1-root/include/linux/ide.h 2003-12-12 23:49:03.391997768 +0100
237@@ -1231,7 +1231,6 @@ typedef struct ide_devices_s {
238 */
239 #ifndef _IDE_C
240 extern ide_hwif_t ide_hwifs[]; /* master data repository */
241-extern int (*ide_probe)(void);
242
243 extern ide_devices_t *idedisk;
244 extern ide_devices_t *idecd;
245
246_
247
This page took 0.074759 seconds and 4 git commands to generate.