[syslinux] [PATCH] pci: fix pci_scan()

Sebastian Herbszt herbszt at gmx.de
Mon Aug 11 13:00:29 PDT 2008


Index: syslinux-3.71-10-g911a37f/com32/lib/pci/scan.c
===================================================================
--- syslinux-3.71-10-g911a37f.orig/com32/lib/pci/scan.c	2008-08-10 01:13:20.000000000 +0200
+++ syslinux-3.71-10-g911a37f/com32/lib/pci/scan.c	2008-08-10 01:18:45.000000000 +0200
@@ -322,10 +322,12 @@
   dprintf("Scanning PCI Buses\n");
 
   for (nbus = 0; nbus < MAX_PCI_BUSSES; nbus++) {
-    dprintf("Probing bus 0x%02x... \n", bus);
+    dprintf("Probing bus 0x%02x... \n", nbus);
+    bus = NULL;
 
     for (ndev = 0; ndev < MAX_PCI_DEVICES; ndev++) {
       maxfunc = 1;		/* Assume a single-function device */
+      slot = NULL;
 
       for (nfunc = 0; nfunc < maxfunc; nfunc++) {
 	a = pci_mkaddr(nbus, ndev, nfunc, 0);
@@ -372,7 +374,7 @@
 
 	dprintf
 	  ("Scanning: BUS %02x DID %08x (%04x:%04x) SID %08x RID %02x\n",
-	   bus, did, did >> 16, (did << 16) >> 16,
+	   nbus, did, did >> 16, (did << 16) >> 16,
 	   sid, rcid & 0xff);
       }
     }




More information about the Syslinux mailing list