Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 133393
b: refs/heads/master
c: 8b07ed2
h: refs/heads/master
i:
  133391: 87a5b3b
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Mar 24, 2009
1 parent cdf8ece commit d453d04
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 42 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bd0c08470fcded75d3904734ee22ae5b363737db
refs/heads/master: 8b07ed26f8eb73d4f55a9d852712cd588c45ff51
30 changes: 4 additions & 26 deletions trunk/drivers/ide/ide-probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -1070,14 +1070,9 @@ static void drive_release_dev (struct device *dev)

static int hwif_init(ide_hwif_t *hwif)
{
int old_irq;

if (!hwif->irq) {
hwif->irq = __ide_default_irq(hwif->io_ports.data_addr);
if (!hwif->irq) {
printk(KERN_ERR "%s: disabled, no IRQ\n", hwif->name);
return 0;
}
printk(KERN_ERR "%s: disabled, no IRQ\n", hwif->name);
return 0;
}

if (register_blkdev(hwif->major, hwif->name))
Expand All @@ -1095,29 +1090,12 @@ static int hwif_init(ide_hwif_t *hwif)

sg_init_table(hwif->sg_table, hwif->sg_max_nents);

if (init_irq(hwif) == 0)
goto done;

old_irq = hwif->irq;
/*
* It failed to initialise. Find the default IRQ for
* this port and try that.
*/
hwif->irq = __ide_default_irq(hwif->io_ports.data_addr);
if (!hwif->irq) {
printk(KERN_ERR "%s: disabled, unable to get IRQ %d\n",
hwif->name, old_irq);
goto out;
}
if (init_irq(hwif)) {
printk(KERN_ERR "%s: probed IRQ %d and default IRQ %d failed\n",
hwif->name, old_irq, hwif->irq);
printk(KERN_ERR "%s: disabled, unable to get IRQ %d\n",
hwif->name, hwif->irq);
goto out;
}
printk(KERN_WARNING "%s: probed IRQ %d failed, using default\n",
hwif->name, hwif->irq);

done:
blk_register_region(MKDEV(hwif->major, 0), MAX_DRIVES << PARTN_BITS,
THIS_MODULE, ata_probe, ata_lock, hwif);
return 1;
Expand Down
15 changes: 0 additions & 15 deletions trunk/include/linux/ide.h
Original file line number Diff line number Diff line change
Expand Up @@ -193,21 +193,6 @@ static inline void ide_std_init_ports(hw_regs_t *hw,
hw->io_ports.ctl_addr = ctl_addr;
}

/* for IDE PCI controllers in legacy mode, temporary */
static inline int __ide_default_irq(unsigned long base)
{
switch (base) {
#ifdef CONFIG_IA64
case 0x1f0: return isa_irq_to_vector(14);
case 0x170: return isa_irq_to_vector(15);
#else
case 0x1f0: return 14;
case 0x170: return 15;
#endif
}
return 0;
}

#if defined(CONFIG_ARM) || defined(CONFIG_FRV) || defined(CONFIG_M68K) || \
defined(CONFIG_MIPS) || defined(CONFIG_MN10300) || defined(CONFIG_PARISC) \
|| defined(CONFIG_PPC) || defined(CONFIG_SPARC) || defined(CONFIG_SPARC64)
Expand Down

0 comments on commit d453d04

Please sign in to comment.