]> git.pld-linux.org Git - packages/kernel.git/blame - 2.6.0-modular-IDE.patch
- obsolete
[packages/kernel.git] / 2.6.0-modular-IDE.patch
CommitLineData
4f25095c 1 drivers/block/ll_rw_blk.c | 2 ++
2 drivers/ide/Makefile | 26 +++++++++++++++-----------
3 drivers/ide/ide-default.c | 1 +
4 drivers/ide/ide-io.c | 8 --------
5 drivers/ide/ide-probe.c | 10 ++++++++++
6 drivers/ide/ide.c | 10 +++++-----
7 include/linux/ide.h | 1 +
8 7 files changed, 34 insertions(+), 24 deletions(-)
9
10diff -puN drivers/block/ll_rw_blk.c~ide-modules-fix drivers/block/ll_rw_blk.c
11--- linux-2.6.0-test9-bk17/drivers/block/ll_rw_blk.c~ide-modules-fix 2003-11-21 19:03:26.271080464 +0100
12+++ linux-2.6.0-test9-bk17-root/drivers/block/ll_rw_blk.c 2003-11-21 19:04:15.240635960 +0100
13@@ -145,6 +145,8 @@ void blk_queue_activity_fn(request_queue
14 q->activity_data = data;
15 }
16
17+EXPORT_SYMBOL(blk_queue_activity_fn);
18+
19 /**
20 * blk_queue_prep_rq - set a prepare_request function for queue
21 * @q: queue
22diff -puN drivers/ide/ide.c~ide-modules-fix drivers/ide/ide.c
23--- linux-2.6.0-test9-bk17/drivers/ide/ide.c~ide-modules-fix 2003-11-21 17:48:48.000000000 +0100
24+++ linux-2.6.0-test9-bk17-root/drivers/ide/ide.c 2003-11-21 19:22:11.204064656 +0100
25@@ -176,6 +176,8 @@ static int system_bus_speed; /* holds wh
26 static int initializing; /* set while initializing built-in drivers */
27
28 DECLARE_MUTEX(ide_cfg_sem);
29+EXPORT_SYMBOL(ide_cfg_sem);
30+
31 spinlock_t ide_lock __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED;
32
33 #ifdef CONFIG_BLK_DEV_IDEPCI
34@@ -1436,6 +1438,7 @@ void ide_add_generic_settings (ide_drive
35 if (drive->media != ide_disk)
36 ide_add_setting(drive, "ide-scsi", SETTING_RW, -1, HDIO_SET_IDE_SCSI, TYPE_BYTE, 0, 1, 1, 1, &drive->scsi, ide_atapi_to_scsi);
37 }
38+EXPORT_SYMBOL(ide_add_generic_settings);
39
40 /*
41 * Delay for *at least* 50ms. As we don't know how much time is left
42@@ -2289,7 +2292,7 @@ void __init ide_init_builtin_drivers (vo
43 */
44 probe_for_hwifs ();
45
46-#ifdef CONFIG_BLK_DEV_IDE
47+#ifndef MODULE
48 if (ide_hwifs[0].io_ports[IDE_DATA_OFFSET])
49 ide_get_lock(NULL, NULL); /* for atari only */
50
51@@ -2297,7 +2300,7 @@ void __init ide_init_builtin_drivers (vo
52
53 if (ide_hwifs[0].io_ports[IDE_DATA_OFFSET])
54 ide_release_lock(); /* for atari only */
55-#endif /* CONFIG_BLK_DEV_IDE */
56+#endif
57
58 #ifdef CONFIG_PROC_FS
59 proc_ide_create();
60@@ -2466,9 +2469,6 @@ int ide_unregister_subdriver (ide_drive_
61 up(&ide_setting_sem);
62 return 1;
63 }
64-#if defined(CONFIG_BLK_DEV_IDEPNP) && defined(CONFIG_PNP) && defined(MODULE)
65- pnpide_init(0);
66-#endif /* CONFIG_BLK_DEV_IDEPNP */
67 #ifdef CONFIG_PROC_FS
68 ide_remove_proc_entries(drive->proc, DRIVER(drive)->proc);
69 ide_remove_proc_entries(drive->proc, generic_subdriver_entries);
70diff -puN drivers/ide/ide-default.c~ide-modules-fix drivers/ide/ide-default.c
71--- linux-2.6.0-test9-bk17/drivers/ide/ide-default.c~ide-modules-fix 2003-11-21 17:48:48.000000000 +0100
72+++ linux-2.6.0-test9-bk17-root/drivers/ide/ide-default.c 2003-11-21 17:48:48.000000000 +0100
73@@ -48,6 +48,7 @@ ide_driver_t idedefault_driver = {
74 .attach = idedefault_attach,
75 .drives = LIST_HEAD_INIT(idedefault_driver.drives)
76 };
77+EXPORT_SYMBOL(idedefault_driver);
78
79 static int idedefault_attach (ide_drive_t *drive)
80 {
81diff -puN drivers/ide/ide-io.c~ide-modules-fix drivers/ide/ide-io.c
82--- linux-2.6.0-test9-bk17/drivers/ide/ide-io.c~ide-modules-fix 2003-11-21 17:48:48.000000000 +0100
83+++ linux-2.6.0-test9-bk17-root/drivers/ide/ide-io.c 2003-11-21 17:48:48.000000000 +0100
84@@ -969,14 +969,6 @@ queue_next:
85 EXPORT_SYMBOL(ide_do_request);
86
87 /*
88- * Passes the stuff to ide_do_request
89- */
90-void do_ide_request(request_queue_t *q)
91-{
92- ide_do_request(q->queuedata, IDE_NO_IRQ);
93-}
94-
95-/*
96 * un-busy the hwgroup etc, and clear any pending DMA status. we want to
97 * retry the current request in pio mode instead of risking tossing it
98 * all away
99diff -puN drivers/ide/ide-probe.c~ide-modules-fix drivers/ide/ide-probe.c
100--- linux-2.6.0-test9-bk17/drivers/ide/ide-probe.c~ide-modules-fix 2003-11-21 17:48:48.000000000 +0100
101+++ linux-2.6.0-test9-bk17-root/drivers/ide/ide-probe.c 2003-11-21 19:31:27.241534112 +0100
102@@ -864,6 +864,7 @@ EXPORT_SYMBOL(probe_hwif);
103 int hwif_init (ide_hwif_t *hwif);
104 int probe_hwif_init (ide_hwif_t *hwif)
105 {
106+#ifndef MODULE
107 hwif->initializing = 1;
108 probe_hwif(hwif);
109 hwif_init(hwif);
110@@ -881,6 +882,7 @@ int probe_hwif_init (ide_hwif_t *hwif)
111 }
112 }
113 hwif->initializing = 0;
114+#endif
115 return 0;
116 }
117
118@@ -915,6 +917,14 @@ EXPORT_SYMBOL(save_match);
119 #endif /* MAX_HWIFS > 1 */
120
121 /*
122+ * Passes the stuff to ide_do_request
123+ */
124+void do_ide_request(request_queue_t *q)
125+{
126+ ide_do_request(q->queuedata, IDE_NO_IRQ);
127+}
128+
129+/*
130 * init request queue
131 */
132 static int ide_init_queue(ide_drive_t *drive)
133diff -puN drivers/ide/Makefile~ide-modules-fix drivers/ide/Makefile
134--- linux-2.6.0-test9-bk17/drivers/ide/Makefile~ide-modules-fix 2003-11-21 17:48:48.000000000 +0100
135+++ linux-2.6.0-test9-bk17-root/drivers/ide/Makefile 2003-11-21 19:32:33.026533272 +0100
136@@ -6,26 +6,30 @@
137 #
138 # Note : at this point, these files are compiled on all systems.
139 # In the future, some of these should be built conditionally.
140-#
141+
142+ide-mod-objs := ide-io.o ide-iops.o ide-taskfile.o ide.o ide-lib.o ide-default.o
143+ide-probe-mod-objs := ide-probe.o
144+
145 # First come modules that register themselves with the core
146-obj-$(CONFIG_BLK_DEV_IDE) += pci/
147+obj-$(CONFIG_BLK_DEV_IDEPCI) += pci/
148+#ide-mod-objs-$(CONFIG_BLK_DEV_CMD640) += pci/cmd640.o
149
150 # Core IDE code - must come before legacy
151+ide-obj-$(CONFIG_BLK_DEV_IDEPCI) += setup-pci.o
152+ide-obj-$(CONFIG_BLK_DEV_IDEDMA_PCI) += ide-dma.o
153+ide-obj-$(CONFIG_BLK_DEV_IDE_TCQ) += ide-tcq.o
154+ide-obj-$(CONFIG_PROC_FS) += ide-proc.o
155
156-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
157 obj-$(CONFIG_BLK_DEV_IDEDISK) += ide-disk.o
158 obj-$(CONFIG_BLK_DEV_IDECD) += ide-cd.o
159 obj-$(CONFIG_BLK_DEV_IDETAPE) += ide-tape.o
160 obj-$(CONFIG_BLK_DEV_IDEFLOPPY) += ide-floppy.o
161
162-obj-$(CONFIG_BLK_DEV_IDEPCI) += setup-pci.o
163-obj-$(CONFIG_BLK_DEV_IDEDMA_PCI) += ide-dma.o
164-obj-$(CONFIG_BLK_DEV_IDE_TCQ) += ide-tcq.o
165-obj-$(CONFIG_BLK_DEV_IDEPNP) += ide-pnp.o
166-
167-ifeq ($(CONFIG_BLK_DEV_IDE),y)
168-obj-$(CONFIG_PROC_FS) += ide-proc.o
169-endif
170+ide-obj-$(CONFIG_BLK_DEV_IDEPNP) += ide-pnp.o
171+
172+ide-mod-objs += $(ide-obj-y)
173+
174+obj-$(CONFIG_BLK_DEV_IDE) += ide-mod.o ide-probe-mod.o
175
176 obj-$(CONFIG_BLK_DEV_IDE) += legacy/ ppc/ arm/
177 obj-$(CONFIG_BLK_DEV_HD) += legacy/
178diff -puN include/linux/ide.h~ide-modules-fix include/linux/ide.h
179--- linux-2.6.0-test9-bk17/include/linux/ide.h~ide-modules-fix 2003-11-21 17:48:48.000000000 +0100
180+++ linux-2.6.0-test9-bk17-root/include/linux/ide.h 2003-11-21 18:01:36.000000000 +0100
181@@ -1249,6 +1249,7 @@ extern ide_devices_t *idescsi;
182 #endif
183 extern int noautodma;
184
185+extern void ide_do_request (ide_hwgroup_t *hwgroup, int masked_irq);
186 extern int ide_end_request (ide_drive_t *drive, int uptodate, int nrsecs);
187
188 /*
189
190
This page took 0.075677 seconds and 4 git commands to generate.