Skip to content

Commit 708e5f9

Browse files
committed
ide: always call ->init_chipset method in do_ide_setup_pci_device()
Call ->init_chipset method also for 'tried_config' / '!pciirq' conditions. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
1 parent 338b9bb commit 708e5f9

1 file changed

Lines changed: 10 additions & 14 deletions

File tree

‎drivers/ide/setup-pci.c‎

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -499,20 +499,21 @@ static int do_ide_setup_pci_device(struct pci_dev *dev,
499499
*/
500500
pciirq = dev->irq;
501501

502+
/*
503+
* This allows offboard ide-pci cards the enable a BIOS,
504+
* verify interrupt settings of split-mirror pci-config
505+
* space, place chipset into init-mode, and/or preserve
506+
* an interrupt if the card is not native ide support.
507+
*/
508+
ret = d->init_chipset ? d->init_chipset(dev, d->name) : 0;
509+
if (ret < 0)
510+
goto out;
511+
502512
/* Is it an "IDE storage" device in non-PCI mode? */
503513
if ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE && (dev->class & 5) != 5) {
504514
if (noisy)
505515
printk(KERN_INFO "%s: not 100%% native mode: "
506516
"will probe irqs later\n", d->name);
507-
/*
508-
* This allows offboard ide-pci cards the enable a BIOS,
509-
* verify interrupt settings of split-mirror pci-config
510-
* space, place chipset into init-mode, and/or preserve
511-
* an interrupt if the card is not native ide support.
512-
*/
513-
ret = d->init_chipset ? d->init_chipset(dev, d->name) : 0;
514-
if (ret < 0)
515-
goto out;
516517
pciirq = ret;
517518
} else if (tried_config) {
518519
if (noisy)
@@ -524,11 +525,6 @@ static int do_ide_setup_pci_device(struct pci_dev *dev,
524525
d->name, pciirq);
525526
pciirq = 0;
526527
} else {
527-
if (d->init_chipset) {
528-
ret = d->init_chipset(dev, d->name);
529-
if (ret < 0)
530-
goto out;
531-
}
532528
if (noisy)
533529
printk(KERN_INFO "%s: 100%% native mode on irq %d\n",
534530
d->name, pciirq);

0 commit comments

Comments
 (0)