Messages in this thread Patch in this message | | | Date | Tue, 8 Apr 2003 01:15:38 +0100 | From | Alan Cox <> | Subject | PATCH: clean up pci interrupt line whacking |
| |
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux-2.5.67/drivers/ide/pci/hpt366.c linux-2.5.67-ac1/drivers/ide/pci/hpt366.c --- linux-2.5.67/drivers/ide/pci/hpt366.c 2003-03-26 19:59:51.000000000 +0000 +++ linux-2.5.67-ac1/drivers/ide/pci/hpt366.c 2003-04-06 23:03:51.000000000 +0100 @@ -1106,13 +1106,10 @@ ((findev->devfn - dev->devfn) == 1) && (PCI_FUNC(findev->devfn) & 1)) { u8 irq = 0, irq2 = 0; - pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq); - pci_read_config_byte(findev, PCI_INTERRUPT_LINE, &irq2); - if (irq != irq2) { - pci_write_config_byte(findev, - PCI_INTERRUPT_LINE, irq); + if (findev->irq != dev->irq) { + /* FIXME: we need a core pci_set_interrupt() */ findev->irq = dev->irq; - printk("%s: pci-config space interrupt " + printk(KERN_WARNING "%s: pci-config space interrupt " "fixed.\n", d->name); } ide_setup_pci_devices(dev, findev, d); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux-2.5.67/drivers/ide/pci/pdc202xx_new.c linux-2.5.67-ac1/drivers/ide/pci/pdc202xx_new.c --- linux-2.5.67/drivers/ide/pci/pdc202xx_new.c 2003-03-26 19:59:51.000000000 +0000 +++ linux-2.5.67-ac1/drivers/ide/pci/pdc202xx_new.c 2003-04-06 23:04:50.000000000 +0100 @@ -592,15 +592,8 @@ if ((findev->vendor == dev->vendor) && (findev->device == dev->device) && (PCI_SLOT(findev->devfn) & 2)) { - u8 irq = 0, irq2 = 0; - pci_read_config_byte(dev, - PCI_INTERRUPT_LINE, &irq); - pci_read_config_byte(findev, - PCI_INTERRUPT_LINE, &irq2); - if (irq != irq2) { + if (findev->irq != dev->irq) { findev->irq = dev->irq; - pci_write_config_byte(findev, - PCI_INTERRUPT_LINE, irq); } ide_setup_pci_devices(dev, findev, d); return; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |