diff options
-rw-r--r-- | drivers/ide/ide-probe.c | 30 | ||||
-rw-r--r-- | include/linux/ide.h | 15 |
2 files changed, 4 insertions, 41 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index 80967307f2b..ebc328c2e7e 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c | |||
@@ -1070,14 +1070,9 @@ static void drive_release_dev (struct device *dev) | |||
1070 | 1070 | ||
1071 | static int hwif_init(ide_hwif_t *hwif) | 1071 | static int hwif_init(ide_hwif_t *hwif) |
1072 | { | 1072 | { |
1073 | int old_irq; | ||
1074 | |||
1075 | if (!hwif->irq) { | 1073 | if (!hwif->irq) { |
1076 | hwif->irq = __ide_default_irq(hwif->io_ports.data_addr); | 1074 | printk(KERN_ERR "%s: disabled, no IRQ\n", hwif->name); |
1077 | if (!hwif->irq) { | 1075 | return 0; |
1078 | printk(KERN_ERR "%s: disabled, no IRQ\n", hwif->name); | ||
1079 | return 0; | ||
1080 | } | ||
1081 | } | 1076 | } |
1082 | 1077 | ||
1083 | if (register_blkdev(hwif->major, hwif->name)) | 1078 | if (register_blkdev(hwif->major, hwif->name)) |
@@ -1095,29 +1090,12 @@ static int hwif_init(ide_hwif_t *hwif) | |||
1095 | 1090 | ||
1096 | sg_init_table(hwif->sg_table, hwif->sg_max_nents); | 1091 | sg_init_table(hwif->sg_table, hwif->sg_max_nents); |
1097 | 1092 | ||
1098 | if (init_irq(hwif) == 0) | ||
1099 | goto done; | ||
1100 | |||
1101 | old_irq = hwif->irq; | ||
1102 | /* | ||
1103 | * It failed to initialise. Find the default IRQ for | ||
1104 | * this port and try that. | ||
1105 | */ | ||
1106 | hwif->irq = __ide_default_irq(hwif->io_ports.data_addr); | ||
1107 | if (!hwif->irq) { | ||
1108 | printk(KERN_ERR "%s: disabled, unable to get IRQ %d\n", | ||
1109 | hwif->name, old_irq); | ||
1110 | goto out; | ||
1111 | } | ||
1112 | if (init_irq(hwif)) { | 1093 | if (init_irq(hwif)) { |
1113 | printk(KERN_ERR "%s: probed IRQ %d and default IRQ %d failed\n", | 1094 | printk(KERN_ERR "%s: disabled, unable to get IRQ %d\n", |
1114 | hwif->name, old_irq, hwif->irq); | 1095 | hwif->name, hwif->irq); |
1115 | goto out; | 1096 | goto out; |
1116 | } | 1097 | } |
1117 | printk(KERN_WARNING "%s: probed IRQ %d failed, using default\n", | ||
1118 | hwif->name, hwif->irq); | ||
1119 | 1098 | ||
1120 | done: | ||
1121 | blk_register_region(MKDEV(hwif->major, 0), MAX_DRIVES << PARTN_BITS, | 1099 | blk_register_region(MKDEV(hwif->major, 0), MAX_DRIVES << PARTN_BITS, |
1122 | THIS_MODULE, ata_probe, ata_lock, hwif); | 1100 | THIS_MODULE, ata_probe, ata_lock, hwif); |
1123 | return 1; | 1101 | return 1; |
diff --git a/include/linux/ide.h b/include/linux/ide.h index bfd07b866b6..31e492c7bde 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -193,21 +193,6 @@ static inline void ide_std_init_ports(hw_regs_t *hw, | |||
193 | hw->io_ports.ctl_addr = ctl_addr; | 193 | hw->io_ports.ctl_addr = ctl_addr; |
194 | } | 194 | } |
195 | 195 | ||
196 | /* for IDE PCI controllers in legacy mode, temporary */ | ||
197 | static inline int __ide_default_irq(unsigned long base) | ||
198 | { | ||
199 | switch (base) { | ||
200 | #ifdef CONFIG_IA64 | ||
201 | case 0x1f0: return isa_irq_to_vector(14); | ||
202 | case 0x170: return isa_irq_to_vector(15); | ||
203 | #else | ||
204 | case 0x1f0: return 14; | ||
205 | case 0x170: return 15; | ||
206 | #endif | ||
207 | } | ||
208 | return 0; | ||
209 | } | ||
210 | |||
211 | #if defined(CONFIG_ARM) || defined(CONFIG_FRV) || defined(CONFIG_M68K) || \ | 196 | #if defined(CONFIG_ARM) || defined(CONFIG_FRV) || defined(CONFIG_M68K) || \ |
212 | defined(CONFIG_MIPS) || defined(CONFIG_MN10300) || defined(CONFIG_PARISC) \ | 197 | defined(CONFIG_MIPS) || defined(CONFIG_MN10300) || defined(CONFIG_PARISC) \ |
213 | || defined(CONFIG_PPC) || defined(CONFIG_SPARC) || defined(CONFIG_SPARC64) | 198 | || defined(CONFIG_PPC) || defined(CONFIG_SPARC) || defined(CONFIG_SPARC64) |