Commit fab80306 authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

[PATCH] clean up pci interrupt line whacking

parent 667c52f5
...@@ -1106,13 +1106,10 @@ static void __init init_setup_hpt374 (struct pci_dev *dev, ide_pci_device_t *d) ...@@ -1106,13 +1106,10 @@ static void __init init_setup_hpt374 (struct pci_dev *dev, ide_pci_device_t *d)
((findev->devfn - dev->devfn) == 1) && ((findev->devfn - dev->devfn) == 1) &&
(PCI_FUNC(findev->devfn) & 1)) { (PCI_FUNC(findev->devfn) & 1)) {
u8 irq = 0, irq2 = 0; u8 irq = 0, irq2 = 0;
pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq); if (findev->irq != dev->irq) {
pci_read_config_byte(findev, PCI_INTERRUPT_LINE, &irq2); /* FIXME: we need a core pci_set_interrupt() */
if (irq != irq2) {
pci_write_config_byte(findev,
PCI_INTERRUPT_LINE, irq);
findev->irq = dev->irq; findev->irq = dev->irq;
printk("%s: pci-config space interrupt " printk(KERN_WARNING "%s: pci-config space interrupt "
"fixed.\n", d->name); "fixed.\n", d->name);
} }
ide_setup_pci_devices(dev, findev, d); ide_setup_pci_devices(dev, findev, d);
......
...@@ -592,15 +592,8 @@ static void __init init_setup_pdc20270 (struct pci_dev *dev, ide_pci_device_t *d ...@@ -592,15 +592,8 @@ static void __init init_setup_pdc20270 (struct pci_dev *dev, ide_pci_device_t *d
if ((findev->vendor == dev->vendor) && if ((findev->vendor == dev->vendor) &&
(findev->device == dev->device) && (findev->device == dev->device) &&
(PCI_SLOT(findev->devfn) & 2)) { (PCI_SLOT(findev->devfn) & 2)) {
u8 irq = 0, irq2 = 0; if (findev->irq != dev->irq) {
pci_read_config_byte(dev,
PCI_INTERRUPT_LINE, &irq);
pci_read_config_byte(findev,
PCI_INTERRUPT_LINE, &irq2);
if (irq != irq2) {
findev->irq = dev->irq; findev->irq = dev->irq;
pci_write_config_byte(findev,
PCI_INTERRUPT_LINE, irq);
} }
ide_setup_pci_devices(dev, findev, d); ide_setup_pci_devices(dev, findev, d);
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment