aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-24 16:53:11 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-24 16:53:11 -0400
commita95925a309cd9a2e7f5a5713fd70e0dadb09890c (patch)
treeab4593438d642fcb425634b0e72b1346c823348b /drivers/ide
parent708e5f9eb68589b87724af3f0fb4e681dfdfd69f (diff)
ide: respect dev->irq in do_ide_setup_pci_device() also if 'tried_config'
* If device is in the PCI native mode respect dev->irq regardless of 'tried_config' in do_ide_setup_pci_device(). * Drop no longer needed 'config' argument from ide_setup_pci_controller(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/setup-pci.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c
index a95d51080237..58f4a95f6f5c 100644
--- a/drivers/ide/setup-pci.c
+++ b/drivers/ide/setup-pci.c
@@ -393,14 +393,14 @@ int ide_hwif_setup_dma(ide_hwif_t *hwif, const struct ide_port_info *d)
393 * @dev: PCI device 393 * @dev: PCI device
394 * @d: IDE port info 394 * @d: IDE port info
395 * @noisy: verbose flag 395 * @noisy: verbose flag
396 * @config: returned as 1 if we configured the hardware
397 * 396 *
398 * Set up the PCI and controller side of the IDE interface. This brings 397 * Set up the PCI and controller side of the IDE interface. This brings
399 * up the PCI side of the device, checks that the device is enabled 398 * up the PCI side of the device, checks that the device is enabled
400 * and enables it if need be 399 * and enables it if need be
401 */ 400 */
402 401
403static int ide_setup_pci_controller(struct pci_dev *dev, const struct ide_port_info *d, int noisy, int *config) 402static int ide_setup_pci_controller(struct pci_dev *dev,
403 const struct ide_port_info *d, int noisy)
404{ 404{
405 int ret; 405 int ret;
406 u16 pcicmd; 406 u16 pcicmd;
@@ -421,7 +421,6 @@ static int ide_setup_pci_controller(struct pci_dev *dev, const struct ide_port_i
421 ret = ide_pci_configure(dev, d); 421 ret = ide_pci_configure(dev, d);
422 if (ret < 0) 422 if (ret < 0)
423 goto out; 423 goto out;
424 *config = 1;
425 printk(KERN_INFO "%s: device enabled (Linux)\n", d->name); 424 printk(KERN_INFO "%s: device enabled (Linux)\n", d->name);
426 } 425 }
427 426
@@ -487,10 +486,9 @@ static int do_ide_setup_pci_device(struct pci_dev *dev,
487 const struct ide_port_info *d, 486 const struct ide_port_info *d,
488 u8 noisy) 487 u8 noisy)
489{ 488{
490 int tried_config = 0;
491 int pciirq, ret; 489 int pciirq, ret;
492 490
493 ret = ide_setup_pci_controller(dev, d, noisy, &tried_config); 491 ret = ide_setup_pci_controller(dev, d, noisy);
494 if (ret < 0) 492 if (ret < 0)
495 goto out; 493 goto out;
496 494
@@ -515,10 +513,6 @@ static int do_ide_setup_pci_device(struct pci_dev *dev,
515 printk(KERN_INFO "%s: not 100%% native mode: " 513 printk(KERN_INFO "%s: not 100%% native mode: "
516 "will probe irqs later\n", d->name); 514 "will probe irqs later\n", d->name);
517 pciirq = ret; 515 pciirq = ret;
518 } else if (tried_config) {
519 if (noisy)
520 printk(KERN_INFO "%s: will probe irqs later\n", d->name);
521 pciirq = 0;
522 } else if (!pciirq) { 516 } else if (!pciirq) {
523 if (noisy) 517 if (noisy)
524 printk(KERN_WARNING "%s: bad irq (%d): will probe later\n", 518 printk(KERN_WARNING "%s: bad irq (%d): will probe later\n",