patch-2.4.22 linux-2.4.22/arch/ppc64/kernel/proc_pcifr.c
Next file: linux-2.4.22/arch/ppc64/kernel/proc_pmc.c
Previous file: linux-2.4.22/arch/ppc64/kernel/ppc_ksyms.c
Back to the patch index
Back to the overall index
- Lines: 22
- Date:
2003-08-25 04:44:40.000000000 -0700
- Orig file:
linux-2.4.21/arch/ppc64/kernel/proc_pcifr.c
- Orig date:
2002-08-02 17:39:43.000000000 -0700
diff -urN linux-2.4.21/arch/ppc64/kernel/proc_pcifr.c linux-2.4.22/arch/ppc64/kernel/proc_pcifr.c
@@ -198,10 +198,18 @@
/* look for the net devices out */
for (dev = dev_base; dev != NULL; dev = dev->next) {
- if (dev->base_addr == PciDev->resource[0].start ) {
- BufLen += sprintf(ProcBuffer+BufLen, " - Net device: %s\n", dev->name);
+ int j;
+
+ if (!dev->base_addr) /* virtual device, no base address */
break;
- } /* if */
+
+ for (j=0;j<6;j++) { /* PCI has 6 base addresses */
+ if (dev->base_addr == PciDev->resource[j].start ) {
+ BufLen += sprintf(ProcBuffer+BufLen, " - Net device: %s\n", dev->name);
+ break;
+ } /* if */
+ }
+ if (j!=6) break; /* found one */
} /* for */
} /* if(PCI_SLOT(PciDev->devfn) != 0) */
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)