diff options
-rw-r--r-- | drivers/ide/Kconfig | 3 | ||||
-rw-r--r-- | drivers/ide/ide.c | 10 | ||||
-rw-r--r-- | drivers/ide/setup-pci.c | 2 | ||||
-rw-r--r-- | include/linux/ide.h | 5 |
4 files changed, 15 insertions, 5 deletions
diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig index a678bbecb489..1d06b415ede9 100644 --- a/drivers/ide/Kconfig +++ b/drivers/ide/Kconfig | |||
@@ -371,6 +371,9 @@ config IDEPCI_SHARE_IRQ | |||
371 | It is safe to say Y to this question, in most cases. | 371 | It is safe to say Y to this question, in most cases. |
372 | If unsure, say N. | 372 | If unsure, say N. |
373 | 373 | ||
374 | config IDEPCI_PCIBUS_ORDER | ||
375 | def_bool PCI && BLK_DEV_IDE=y && BLK_DEV_IDEPCI | ||
376 | |||
374 | config BLK_DEV_OFFBOARD | 377 | config BLK_DEV_OFFBOARD |
375 | bool "Boot off-board chipsets first support" | 378 | bool "Boot off-board chipsets first support" |
376 | depends on PCI && BLK_DEV_IDEPCI | 379 | depends on PCI && BLK_DEV_IDEPCI |
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index 038f2610e734..f2b547ff7722 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c | |||
@@ -172,7 +172,7 @@ static int system_bus_speed; /* holds what we think is VESA/PCI bus speed */ | |||
172 | DECLARE_MUTEX(ide_cfg_sem); | 172 | DECLARE_MUTEX(ide_cfg_sem); |
173 | __cacheline_aligned_in_smp DEFINE_SPINLOCK(ide_lock); | 173 | __cacheline_aligned_in_smp DEFINE_SPINLOCK(ide_lock); |
174 | 174 | ||
175 | #ifdef CONFIG_BLK_DEV_IDEPCI | 175 | #ifdef CONFIG_IDEPCI_PCIBUS_ORDER |
176 | static int ide_scan_direction; /* THIS was formerly 2.2.x pci=reverse */ | 176 | static int ide_scan_direction; /* THIS was formerly 2.2.x pci=reverse */ |
177 | #endif | 177 | #endif |
178 | 178 | ||
@@ -1333,13 +1333,13 @@ static int __init ide_setup(char *s) | |||
1333 | return 1; | 1333 | return 1; |
1334 | } | 1334 | } |
1335 | 1335 | ||
1336 | #ifdef CONFIG_BLK_DEV_IDEPCI | 1336 | #ifdef CONFIG_IDEPCI_PCIBUS_ORDER |
1337 | if (!strcmp(s, "ide=reverse")) { | 1337 | if (!strcmp(s, "ide=reverse")) { |
1338 | ide_scan_direction = 1; | 1338 | ide_scan_direction = 1; |
1339 | printk(" : Enabled support for IDE inverse scan order.\n"); | 1339 | printk(" : Enabled support for IDE inverse scan order.\n"); |
1340 | return 1; | 1340 | return 1; |
1341 | } | 1341 | } |
1342 | #endif /* CONFIG_BLK_DEV_IDEPCI */ | 1342 | #endif |
1343 | 1343 | ||
1344 | #ifdef CONFIG_BLK_DEV_IDEACPI | 1344 | #ifdef CONFIG_BLK_DEV_IDEACPI |
1345 | if (!strcmp(s, "ide=noacpi")) { | 1345 | if (!strcmp(s, "ide=noacpi")) { |
@@ -1599,9 +1599,9 @@ extern void __init h8300_ide_init(void); | |||
1599 | */ | 1599 | */ |
1600 | static void __init probe_for_hwifs (void) | 1600 | static void __init probe_for_hwifs (void) |
1601 | { | 1601 | { |
1602 | #ifdef CONFIG_BLK_DEV_IDEPCI | 1602 | #ifdef CONFIG_IDEPCI_PCIBUS_ORDER |
1603 | ide_scan_pcibus(ide_scan_direction); | 1603 | ide_scan_pcibus(ide_scan_direction); |
1604 | #endif /* CONFIG_BLK_DEV_IDEPCI */ | 1604 | #endif |
1605 | 1605 | ||
1606 | #ifdef CONFIG_ETRAX_IDE | 1606 | #ifdef CONFIG_ETRAX_IDE |
1607 | { | 1607 | { |
diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c index 892cda755782..67035ba4bf5e 100644 --- a/drivers/ide/setup-pci.c +++ b/drivers/ide/setup-pci.c | |||
@@ -772,6 +772,7 @@ out: | |||
772 | 772 | ||
773 | EXPORT_SYMBOL_GPL(ide_setup_pci_devices); | 773 | EXPORT_SYMBOL_GPL(ide_setup_pci_devices); |
774 | 774 | ||
775 | #ifdef CONFIG_IDEPCI_PCIBUS_ORDER | ||
775 | /* | 776 | /* |
776 | * Module interfaces | 777 | * Module interfaces |
777 | */ | 778 | */ |
@@ -878,3 +879,4 @@ void __init ide_scan_pcibus (int scan_direction) | |||
878 | __pci_register_driver(d, d->driver.owner, d->driver.mod_name); | 879 | __pci_register_driver(d, d->driver.owner, d->driver.mod_name); |
879 | } | 880 | } |
880 | } | 881 | } |
882 | #endif | ||
diff --git a/include/linux/ide.h b/include/linux/ide.h index 52d482a16dd9..df4e6a510310 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -1205,9 +1205,14 @@ void ide_init_disk(struct gendisk *, ide_drive_t *); | |||
1205 | 1205 | ||
1206 | extern int ideprobe_init(void); | 1206 | extern int ideprobe_init(void); |
1207 | 1207 | ||
1208 | #ifdef CONFIG_IDEPCI_PCIBUS_ORDER | ||
1208 | extern void ide_scan_pcibus(int scan_direction) __init; | 1209 | extern void ide_scan_pcibus(int scan_direction) __init; |
1209 | extern int __ide_pci_register_driver(struct pci_driver *driver, struct module *owner, const char *mod_name); | 1210 | extern int __ide_pci_register_driver(struct pci_driver *driver, struct module *owner, const char *mod_name); |
1210 | #define ide_pci_register_driver(d) __ide_pci_register_driver(d, THIS_MODULE, KBUILD_MODNAME) | 1211 | #define ide_pci_register_driver(d) __ide_pci_register_driver(d, THIS_MODULE, KBUILD_MODNAME) |
1212 | #else | ||
1213 | #define ide_pci_register_driver(d) pci_register_driver(d) | ||
1214 | #endif | ||
1215 | |||
1211 | void ide_pci_setup_ports(struct pci_dev *, struct ide_pci_device_s *, int, ata_index_t *); | 1216 | void ide_pci_setup_ports(struct pci_dev *, struct ide_pci_device_s *, int, ata_index_t *); |
1212 | extern void ide_setup_pci_noise (struct pci_dev *dev, struct ide_pci_device_s *d); | 1217 | extern void ide_setup_pci_noise (struct pci_dev *dev, struct ide_pci_device_s *d); |
1213 | 1218 | ||