[coreboot] [commit] r5345 - trunk/src/devices

repository service svn at coreboot.org
Fri Apr 2 18:30:26 CEST 2010


Author: stepan
Date: Fri Apr  2 18:30:25 2010
New Revision: 5345
URL: https://tracker.coreboot.org/trac/coreboot/changeset/5345

Log:
The error message is misleading, even for a SPEW, because
the slot is empty, it's NOT a bad ID (and the message is
more confusing than helpful even in SPEW)

Signed-off-by: Stefan Reinauer <stepan at coresystems.de>
Acked-by: Ronald G. Minnich <rminnich at gmail.com>
Acked-by: Myles Watson <mylesgw at gmail.com>

Modified:
   trunk/src/devices/pci_device.c

Modified: trunk/src/devices/pci_device.c
==============================================================================
--- trunk/src/devices/pci_device.c	Thu Apr  1 11:50:32 2010	(r5344)
+++ trunk/src/devices/pci_device.c	Fri Apr  2 18:30:25 2010	(r5345)
@@ -910,10 +910,14 @@
 		dummy.path.pci.devfn = devfn;
 		id = pci_read_config32(&dummy, PCI_VENDOR_ID);
 		/* Have we found something?
-		 * Some broken boards return 0 if a slot is empty.
+		 * Some broken boards return 0 if a slot is empty, but
+		 * the expected answer is 0xffffffff
 		 */
-		if ((id == 0xffffffff) || (id == 0x00000000) ||
-		    (id == 0x0000ffff) || (id == 0xffff0000)) {
+		if (id == 0xffffffff) {
+			return NULL;
+		}
+		if ((id == 0x00000000) || (id == 0x0000ffff) ||
+		    (id == 0xffff0000)) {
 			printk(BIOS_SPEW, "%s, bad id 0x%x\n", dev_path(&dummy), id);
 			return NULL;
 		}




More information about the coreboot mailing list