Skip to contentSkip to conversation

PnP BIOS no-irq/IRQ0 bug

PATCH New Thomas Hood 1 participant 1 message Sep 20, 2001 Pnp support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PnP BIOS no-irq/IRQ0 bug

Here is a one-character patch which may be self-explanatory. The irq should be initialized to -1 (i.e., "no irq") rather than 0 (i.e., IRQ0) so that the irq field in the pci_dev will be -1 and not 0 if the PnP BIOS returns an irq mask with no
bits set. // Thomas <jdthood_AT_yahoo.co.uk>

drivers/pnp/pnp_bios.c renamed from drivers/pnp/pnp_bios.c_ORIG +1 -1
@@ -716,7 +716,7 @@
 static void __init pnpbios_rawdata_2_pci_dev(struct pnp_bios_node *node, struct pci_dev *pci_dev)
 {
 	unsigned char *p = node->data, *lastp=NULL;
-        int mask,i,io,irq=0,len,dma=-1;
+        int mask,i,io,irq=-1,len,dma=-1;
 
 	memset(pci_dev, 0, sizeof(struct pci_dev));
         while ( (char *)p < ((char *)node->data + node->size )) {