]> git.pld-linux.org Git - packages/kernel.git/blob - 2.6.0-t11-ide2.patch
- added description of djurban's branch
[packages/kernel.git] / 2.6.0-t11-ide2.patch
1  drivers/block/ll_rw_blk.c    |    2 ++
2  drivers/ide/Makefile         |   14 +++++++-------
3  drivers/ide/ide-probe-mini.c |   23 +++++++++++++++++++++++
4  drivers/ide/ide-probe.c      |   20 +++++++++++++-------
5  drivers/ide/ide.c            |   32 ++++++--------------------------
6  include/linux/ide.h          |    1 -
7  6 files changed, 51 insertions(+), 41 deletions(-)
8
9 diff -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 14:10:29.605600968 +0100
11 +++ linux-2.6.0-test11-bart1-root/drivers/block/ll_rw_blk.c     2003-12-12 14:10:50.736388600 +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
21 diff -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 14:10:13.949980984 +0100
23 +++ linux-2.6.0-test11-bart1-root/drivers/ide/ide.c     2003-12-12 14:10:13.968978096 +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 @@ -443,21 +440,6 @@ u8 ide_dump_status (ide_drive_t *drive, 
35  
36  EXPORT_SYMBOL(ide_dump_status);
37  
38 -
39 -
40 -void ide_probe_module (void)
41 -{
42 -       if (!ide_probe) {
43 -#if defined(CONFIG_KMOD) && defined(CONFIG_BLK_DEV_IDE_MODULE)
44 -               (void) request_module("ide-probe-mod");
45 -#endif /* (CONFIG_KMOD) && (CONFIG_BLK_DEV_IDE_MODULE) */
46 -       } else {
47 -               (void)ide_probe();
48 -       }
49 -}
50 -
51 -EXPORT_SYMBOL(ide_probe_module);
52 -
53  static int ide_open (struct inode * inode, struct file * filp)
54  {
55         return -ENXIO;
56 @@ -585,8 +567,6 @@ control_region_busy:
57         return -EBUSY;
58  }
59  
60 -EXPORT_SYMBOL(ide_hwif_request_regions);
61 -
62  /**
63   *     ide_hwif_release_regions - free IDE resources
64   *
65 @@ -622,8 +602,6 @@ void ide_hwif_release_regions(ide_hwif_t
66         }
67  }
68  
69 -EXPORT_SYMBOL(ide_hwif_release_regions);
70 -
71  extern void init_hwif_data(unsigned int index);
72  
73  /**
74 @@ -992,6 +970,8 @@ void ide_setup_ports (      hw_regs_t *hw,
75  
76  EXPORT_SYMBOL(ide_setup_ports);
77  
78 +extern int ideprobe_init_module(void);
79 +
80  /*
81   * Register an IDE interface, specifying exactly the registers etc
82   * Set init=1 iff calling before probes have taken place.
83 @@ -1033,7 +1013,10 @@ found:
84         hwif->chipset = hw->chipset;
85  
86         if (!initializing) {
87 -               ide_probe_module();
88 +#ifdef MODULE
89 +               if (ideprobe_init_module() == -EBUSY)
90 +#endif
91 +                       ideprobe_init();
92  #ifdef CONFIG_PROC_FS
93                 create_proc_ide_interfaces();
94  #endif
95 @@ -1517,8 +1500,6 @@ int ata_attach(ide_drive_t *drive)
96         return 1;
97  }
98  
99 -EXPORT_SYMBOL(ata_attach);
100 -
101  static int generic_ide_suspend(struct device *dev, u32 state)
102  {
103         ide_drive_t *drive = dev->driver_data;
104 @@ -2564,7 +2545,6 @@ EXPORT_SYMBOL(ide_fops);
105   */
106  
107  EXPORT_SYMBOL(ide_lock);
108 -EXPORT_SYMBOL(ide_probe);
109  
110  struct bus_type ide_bus_type = {
111         .name           = "ide",
112 diff -puN drivers/ide/ide-probe.c~ide-modules drivers/ide/ide-probe.c
113 --- linux-2.6.0-test11-bart1/drivers/ide/ide-probe.c~ide-modules        2003-12-12 14:10:13.943981896 +0100
114 +++ linux-2.6.0-test11-bart1-root/drivers/ide/ide-probe.c       2003-12-12 14:10:13.964978704 +0100
115 @@ -1348,27 +1348,33 @@ int ideprobe_init (void)
116                                         ata_attach(&hwif->drives[unit]);
117                 }
118         }
119 -       if (!ide_probe)
120 -               ide_probe = &ideprobe_init;
121         MOD_DEC_USE_COUNT;
122         return 0;
123  }
124  
125  #ifdef MODULE
126 -int init_module (void)
127 +static int ideprobe_done;
128 +
129 +int ideprobe_init_module(void)
130  {
131         unsigned int index;
132 -       
133 +
134 +       if (ideprobe_done)
135 +               return -EBUSY;
136 +
137         for (index = 0; index < MAX_HWIFS; ++index)
138                 ide_unregister(index);
139         ideprobe_init();
140         create_proc_ide_interfaces();
141 +       ideprobe_done = 1;
142         return 0;
143  }
144  
145 -void cleanup_module (void)
146 +EXPORT_SYMBOL_GPL(ideprobe_init_module);
147 +
148 +void ideprobe_cleanup_module(void)
149  {
150 -       ide_probe = NULL;
151  }
152 -MODULE_LICENSE("GPL");
153 +
154 +EXPORT_SYMBOL_GPL(ideprobe_cleanup_module);
155  #endif /* MODULE */
156 diff -puN /dev/null drivers/ide/ide-probe-mini.c
157 --- /dev/null   2003-01-30 11:24:37.000000000 +0100
158 +++ linux-2.6.0-test11-bart1-root/drivers/ide/ide-probe-mini.c  2003-12-12 14:10:13.965978552 +0100
159 @@ -0,0 +1,23 @@
160 +/*
161 + *  linux/drivers/ide/ide-probe-mini.c Version 1
162 + *
163 + *  Copyright (C) 1994-1998  Linus Torvalds & authors (see below)
164 + */
165 +
166 +#include <linux/config.h>
167 +#include <linux/init.h>
168 +#include <linux/module.h>
169 +#include <linux/types.h>
170 +#include <linux/string.h>
171 +#include <linux/kernel.h>
172 +#include <linux/kmod.h>
173 +
174 +#ifdef MODULE
175 +extern int ideprobe_init_module(void);
176 +extern void ideprobe_cleanup_module(void);
177 +
178 +module_init(ideprobe_init_module);
179 +module_exit(ideprobe_cleanup_module);
180 +
181 +MODULE_LICENSE("GPL");
182 +#endif
183 diff -puN drivers/ide/Makefile~ide-modules drivers/ide/Makefile
184 --- linux-2.6.0-test11-bart1/drivers/ide/Makefile~ide-modules   2003-12-12 14:10:13.946981440 +0100
185 +++ linux-2.6.0-test11-bart1-root/drivers/ide/Makefile  2003-12-12 14:24:35.073070376 +0100
186 @@ -10,22 +10,22 @@
187  # First come modules that register themselves with the core
188  obj-$(CONFIG_BLK_DEV_IDE)              += pci/
189  
190 +ide-core-objs  := ide-io.o ide-probe.o ide-iops.o ide-taskfile.o ide.o ide-lib.o ide-default.o
191 +
192  # Core IDE code - must come before legacy
193 +ide-core-$(CONFIG_BLK_DEV_IDEPCI)      += setup-pci.o
194 +ide-core-$(CONFIG_BLK_DEV_IDEDMA_PCI)  += ide-dma.o
195 +ide-core-$(CONFIG_BLK_DEV_IDE_TCQ)     += ide-tcq.o
196 +ide-core-$(CONFIG_PROC_FS)             += ide-proc.o
197  
198 -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
199  obj-$(CONFIG_BLK_DEV_IDEDISK)          += ide-disk.o
200  obj-$(CONFIG_BLK_DEV_IDECD)            += ide-cd.o
201  obj-$(CONFIG_BLK_DEV_IDETAPE)          += ide-tape.o
202  obj-$(CONFIG_BLK_DEV_IDEFLOPPY)                += ide-floppy.o
203  
204 -obj-$(CONFIG_BLK_DEV_IDEPCI)           += setup-pci.o
205 -obj-$(CONFIG_BLK_DEV_IDEDMA_PCI)       += ide-dma.o
206 -obj-$(CONFIG_BLK_DEV_IDE_TCQ)          += ide-tcq.o
207  obj-$(CONFIG_BLK_DEV_IDEPNP)           += ide-pnp.o
208  
209 -ifeq ($(CONFIG_BLK_DEV_IDE),y)
210 -obj-$(CONFIG_PROC_FS)                  += ide-proc.o
211 -endif
212 +obj-$(CONFIG_BLK_DEV_IDE)              += ide-core.o ide-probe-mini.o
213  
214  obj-$(CONFIG_BLK_DEV_IDE)              += legacy/ ppc/ arm/
215  obj-$(CONFIG_BLK_DEV_HD)               += legacy/
216 diff -puN include/linux/ide.h~ide-modules include/linux/ide.h
217 --- linux-2.6.0-test11-bart1/include/linux/ide.h~ide-modules    2003-12-12 14:10:13.960979312 +0100
218 +++ linux-2.6.0-test11-bart1-root/include/linux/ide.h   2003-12-12 14:10:13.969977944 +0100
219 @@ -1238,7 +1238,6 @@ typedef struct ide_devices_s {
220   */
221  #ifndef _IDE_C
222  extern ide_hwif_t      ide_hwifs[];            /* master data repository */
223 -extern int (*ide_probe)(void);
224  
225  extern ide_devices_t   *idedisk;
226  extern ide_devices_t   *idecd;
This page took 0.06227 seconds and 3 git commands to generate.