drivers/block/ll_rw_blk.c | 2 ++ drivers/ide/Makefile | 26 +++++++++++++++----------- drivers/ide/ide-default.c | 1 + drivers/ide/ide-io.c | 8 -------- drivers/ide/ide-probe.c | 10 ++++++++++ drivers/ide/ide.c | 10 +++++----- include/linux/ide.h | 1 + 7 files changed, 34 insertions(+), 24 deletions(-) diff -puN drivers/block/ll_rw_blk.c~ide-modules-fix drivers/block/ll_rw_blk.c --- linux-2.6.0-test9-bk17/drivers/block/ll_rw_blk.c~ide-modules-fix 2003-11-21 19:03:26.271080464 +0100 +++ linux-2.6.0-test9-bk17-root/drivers/block/ll_rw_blk.c 2003-11-21 19:04:15.240635960 +0100 @@ -145,6 +145,8 @@ void blk_queue_activity_fn(request_queue q->activity_data = data; } +EXPORT_SYMBOL(blk_queue_activity_fn); + /** * blk_queue_prep_rq - set a prepare_request function for queue * @q: queue diff -puN drivers/ide/ide.c~ide-modules-fix drivers/ide/ide.c --- linux-2.6.0-test9-bk17/drivers/ide/ide.c~ide-modules-fix 2003-11-21 17:48:48.000000000 +0100 +++ linux-2.6.0-test9-bk17-root/drivers/ide/ide.c 2003-11-21 19:22:11.204064656 +0100 @@ -176,6 +176,8 @@ static int system_bus_speed; /* holds wh static int initializing; /* set while initializing built-in drivers */ DECLARE_MUTEX(ide_cfg_sem); +EXPORT_SYMBOL(ide_cfg_sem); + spinlock_t ide_lock __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED; #ifdef CONFIG_BLK_DEV_IDEPCI @@ -1436,6 +1438,7 @@ void ide_add_generic_settings (ide_drive if (drive->media != ide_disk) 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); } +EXPORT_SYMBOL(ide_add_generic_settings); /* * Delay for *at least* 50ms. As we don't know how much time is left @@ -2289,7 +2292,7 @@ void __init ide_init_builtin_drivers (vo */ probe_for_hwifs (); -#ifdef CONFIG_BLK_DEV_IDE +#ifndef MODULE if (ide_hwifs[0].io_ports[IDE_DATA_OFFSET]) ide_get_lock(NULL, NULL); /* for atari only */ @@ -2297,7 +2300,7 @@ void __init ide_init_builtin_drivers (vo if (ide_hwifs[0].io_ports[IDE_DATA_OFFSET]) ide_release_lock(); /* for atari only */ -#endif /* CONFIG_BLK_DEV_IDE */ +#endif #ifdef CONFIG_PROC_FS proc_ide_create(); @@ -2466,9 +2469,6 @@ int ide_unregister_subdriver (ide_drive_ up(&ide_setting_sem); return 1; } -#if defined(CONFIG_BLK_DEV_IDEPNP) && defined(CONFIG_PNP) && defined(MODULE) - pnpide_init(0); -#endif /* CONFIG_BLK_DEV_IDEPNP */ #ifdef CONFIG_PROC_FS ide_remove_proc_entries(drive->proc, DRIVER(drive)->proc); ide_remove_proc_entries(drive->proc, generic_subdriver_entries); diff -puN drivers/ide/ide-default.c~ide-modules-fix drivers/ide/ide-default.c --- linux-2.6.0-test9-bk17/drivers/ide/ide-default.c~ide-modules-fix 2003-11-21 17:48:48.000000000 +0100 +++ linux-2.6.0-test9-bk17-root/drivers/ide/ide-default.c 2003-11-21 17:48:48.000000000 +0100 @@ -48,6 +48,7 @@ ide_driver_t idedefault_driver = { .attach = idedefault_attach, .drives = LIST_HEAD_INIT(idedefault_driver.drives) }; +EXPORT_SYMBOL(idedefault_driver); static int idedefault_attach (ide_drive_t *drive) { diff -puN drivers/ide/ide-io.c~ide-modules-fix drivers/ide/ide-io.c --- linux-2.6.0-test9-bk17/drivers/ide/ide-io.c~ide-modules-fix 2003-11-21 17:48:48.000000000 +0100 +++ linux-2.6.0-test9-bk17-root/drivers/ide/ide-io.c 2003-11-21 17:48:48.000000000 +0100 @@ -969,14 +969,6 @@ queue_next: EXPORT_SYMBOL(ide_do_request); /* - * Passes the stuff to ide_do_request - */ -void do_ide_request(request_queue_t *q) -{ - ide_do_request(q->queuedata, IDE_NO_IRQ); -} - -/* * un-busy the hwgroup etc, and clear any pending DMA status. we want to * retry the current request in pio mode instead of risking tossing it * all away diff -puN drivers/ide/ide-probe.c~ide-modules-fix drivers/ide/ide-probe.c --- linux-2.6.0-test9-bk17/drivers/ide/ide-probe.c~ide-modules-fix 2003-11-21 17:48:48.000000000 +0100 +++ linux-2.6.0-test9-bk17-root/drivers/ide/ide-probe.c 2003-11-21 19:31:27.241534112 +0100 @@ -864,6 +864,7 @@ EXPORT_SYMBOL(probe_hwif); int hwif_init (ide_hwif_t *hwif); int probe_hwif_init (ide_hwif_t *hwif) { +#ifndef MODULE hwif->initializing = 1; probe_hwif(hwif); hwif_init(hwif); @@ -881,6 +882,7 @@ int probe_hwif_init (ide_hwif_t *hwif) } } hwif->initializing = 0; +#endif return 0; } @@ -915,6 +917,14 @@ EXPORT_SYMBOL(save_match); #endif /* MAX_HWIFS > 1 */ /* + * Passes the stuff to ide_do_request + */ +void do_ide_request(request_queue_t *q) +{ + ide_do_request(q->queuedata, IDE_NO_IRQ); +} + +/* * init request queue */ static int ide_init_queue(ide_drive_t *drive) diff -puN drivers/ide/Makefile~ide-modules-fix drivers/ide/Makefile --- linux-2.6.0-test9-bk17/drivers/ide/Makefile~ide-modules-fix 2003-11-21 17:48:48.000000000 +0100 +++ linux-2.6.0-test9-bk17-root/drivers/ide/Makefile 2003-11-21 19:32:33.026533272 +0100 @@ -6,26 +6,30 @@ # # Note : at this point, these files are compiled on all systems. # In the future, some of these should be built conditionally. -# + +ide-mod-objs := ide-io.o ide-iops.o ide-taskfile.o ide.o ide-lib.o ide-default.o +ide-probe-mod-objs := ide-probe.o + # First come modules that register themselves with the core -obj-$(CONFIG_BLK_DEV_IDE) += pci/ +obj-$(CONFIG_BLK_DEV_IDEPCI) += pci/ +#ide-mod-objs-$(CONFIG_BLK_DEV_CMD640) += pci/cmd640.o # Core IDE code - must come before legacy +ide-obj-$(CONFIG_BLK_DEV_IDEPCI) += setup-pci.o +ide-obj-$(CONFIG_BLK_DEV_IDEDMA_PCI) += ide-dma.o +ide-obj-$(CONFIG_BLK_DEV_IDE_TCQ) += ide-tcq.o +ide-obj-$(CONFIG_PROC_FS) += ide-proc.o -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 obj-$(CONFIG_BLK_DEV_IDEDISK) += ide-disk.o obj-$(CONFIG_BLK_DEV_IDECD) += ide-cd.o obj-$(CONFIG_BLK_DEV_IDETAPE) += ide-tape.o obj-$(CONFIG_BLK_DEV_IDEFLOPPY) += ide-floppy.o -obj-$(CONFIG_BLK_DEV_IDEPCI) += setup-pci.o -obj-$(CONFIG_BLK_DEV_IDEDMA_PCI) += ide-dma.o -obj-$(CONFIG_BLK_DEV_IDE_TCQ) += ide-tcq.o -obj-$(CONFIG_BLK_DEV_IDEPNP) += ide-pnp.o - -ifeq ($(CONFIG_BLK_DEV_IDE),y) -obj-$(CONFIG_PROC_FS) += ide-proc.o -endif +ide-obj-$(CONFIG_BLK_DEV_IDEPNP) += ide-pnp.o + +ide-mod-objs += $(ide-obj-y) + +obj-$(CONFIG_BLK_DEV_IDE) += ide-mod.o ide-probe-mod.o obj-$(CONFIG_BLK_DEV_IDE) += legacy/ ppc/ arm/ obj-$(CONFIG_BLK_DEV_HD) += legacy/ diff -puN include/linux/ide.h~ide-modules-fix include/linux/ide.h --- linux-2.6.0-test9-bk17/include/linux/ide.h~ide-modules-fix 2003-11-21 17:48:48.000000000 +0100 +++ linux-2.6.0-test9-bk17-root/include/linux/ide.h 2003-11-21 18:01:36.000000000 +0100 @@ -1249,6 +1249,7 @@ extern ide_devices_t *idescsi; #endif extern int noautodma; +extern void ide_do_request (ide_hwgroup_t *hwgroup, int masked_irq); extern int ide_end_request (ide_drive_t *drive, int uptodate, int nrsecs); /*