Skip to contentSkip to conversation

Patch for shared interrupts in PCI IDE

PATCH Pete Zaitcev 1 participant 1 message May 4, 2001

lore
Share & tools
lore
#0 lore raw

One of our customers has a Fujitsu laptop, poor thing... It shares IRQ10 between Eepro, additional IDE for CD-ROM (CMD646), and USB controllers. I talked this over with DaveM briefly, and if I understood him right, something like the attached patch may be in order. Anyone cares to comment?

Thank you,
-- Pete

include/linux/ide.h +4 -0
diff -ur -X dontdiff linux-2.4.4/include/linux/ide.h linux-2.4.4-niph/include/linux/ide.h
@@ -408,6 +408,10 @@
 		ide_pmac
 } hwif_chipset_t;
 
+#define IDE_CHIPSET_PCI_MASK	\
+    ((1<<ide_pci)|(1<<ide_cmd646)|(1<<ide_ali14xx))
+#define IDE_CHIPSET_IS_PCI(c)	((IDE_CHIPSET_PCI_MASK >> (c)) & 1)
+
 #ifdef CONFIG_BLK_DEV_IDEPCI
 typedef struct ide_pci_devid_s {
 	unsigned short	vid;
drivers/ide/ide-probe.c +2 -2
diff -ur -X dontdiff linux-2.4.4/drivers/ide/ide-probe.c linux-2.4.4-niph/drivers/ide/ide-probe.c
@@ -681,9 +681,9 @@
 	 */
 	if (!match || match->irq != hwif->irq) {
 #ifdef CONFIG_IDEPCI_SHARE_IRQ
-		int sa = (hwif->chipset == ide_pci) ? SA_SHIRQ : SA_INTERRUPT;
+		int sa = IDE_CHIPSET_IS_PCI(hwif->chipset) ? SA_SHIRQ : SA_INTERRUPT;
 #else /* !CONFIG_IDEPCI_SHARE_IRQ */
-		int sa = (hwif->chipset == ide_pci) ? SA_INTERRUPT|SA_SHIRQ : SA_INTERRUPT;
+		int sa = IDE_CHIPSET_IS_PCI(hwif->chipset) ? SA_INTERRUPT|SA_SHIRQ : SA_INTERRUPT;
 #endif /* CONFIG_IDEPCI_SHARE_IRQ */
 		if (ide_request_irq(hwif->irq, &ide_intr, sa, hwif->name, hwgroup)) {
 			if (!match)