devices/pci_devices.c

mark.wilkinson at 2pmtech.com mark.wilkinson at 2pmtech.com
Thu Dec 2 00:09:01 CET 2004


Hi Eric, Ron,
    I noticed what might be a slight problem with some error messages in the
pci_level_irq routine. When it reports the new settings, it masks off the lower
nibble of intBits to compare against the byte read. If an interrupt line is set
in the upper nibble of the byte, then the error message will always be
displayed even if the setting was successful.

I've included a diff that should fix the masks.

Regards
Mark Wilkinson.

----------------------------------------------------------------
This message was sent using ISPMailNow.com
-------------- next part --------------
Index: freebios2/src/devices/pci_device.c
===================================================================
RCS file: /cvsroot/freebios/freebios2/src/devices/pci_device.c,v
retrieving revision 1.29
diff -u -r1.29 pci_device.c
--- freebios2/src/devices/pci_device.c	21 Oct 2004 10:43:55 -0000	1.29
+++ freebios2/src/devices/pci_device.c	2 Dec 2004 10:15:11 -0000
@@ -924,13 +924,13 @@
 
 	/* this seems like an error but is not ... */
 #if 1
-	if (inb(0x4d0) != (intBits & 0xf)) {
+	if (inb(0x4d0) != (intBits & 0xff)) {
 	  printk_err("%s: lower order bits are wrong: want 0x%x, got 0x%x\n",
-		     __func__, intBits &0xf, inb(0x4d0));
+		     __func__, intBits &0xff, inb(0x4d0));
 	}
-	if (inb(0x4d1) != ((intBits >> 8) & 0xf)) {
-	  printk_err("%s: lower order bits are wrong: want 0x%x, got 0x%x\n",
-		     __func__, (intBits>>8) &0xf, inb(0x4d1));
+	if (inb(0x4d1) != ((intBits >> 8) & 0xff)) {
+	  printk_err("%s: high order bits are wrong: want 0x%x, got 0x%x\n",
+		     __func__, (intBits>>8) &0xff, inb(0x4d1));
 	}
 #endif
 }


More information about the coreboot mailing list