public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* PATCH: clean up pci interrupt line whacking
@ 2003-04-08  0:15 Alan Cox
  2003-04-07 23:29 ` Carl-Daniel Hailfinger
  2003-04-08  9:09 ` Martin Mares
  0 siblings, 2 replies; 4+ messages in thread
From: Alan Cox @ 2003-04-08  0:15 UTC (permalink / raw)
  To: linux-kernel, torvalds

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;

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-04-08  9:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-08  0:15 PATCH: clean up pci interrupt line whacking Alan Cox
2003-04-07 23:29 ` Carl-Daniel Hailfinger
2003-04-07 22:46   ` Alan Cox
2003-04-08  9:09 ` Martin Mares

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox