summaryrefslogtreecommitdiffstats
path: root/src/interface/bofm
diff options
context:
space:
mode:
authorMichael Brown2011-05-04 13:04:14 +0200
committerMichael Brown2011-05-04 13:14:37 +0200
commitbfd8b3bff9b187850ca8b1e436b2eedbb45b5971 (patch)
treedbf3ccbb607b71f94a861dc297a3bee5f80868eb /src/interface/bofm
parent[bofm] Use "mport" rather than "port" to describe mport value (diff)
downloadipxe-bfd8b3bff9b187850ca8b1e436b2eedbb45b5971.tar.gz
ipxe-bfd8b3bff9b187850ca8b1e436b2eedbb45b5971.tar.xz
ipxe-bfd8b3bff9b187850ca8b1e436b2eedbb45b5971.zip
[bofm] Report {slot,port} to {bus:dev.fn,mport} mapping on newer BOFM builds
Newer BOFM builds provide support for mapping multiple physical ports to a single PCI bus:dev.fn via PCI VPD descriptions. These builds will also leave the {slot,port} field intact, and will populate the mport field with a meaningful value. Older BOFM builds will zero out the {slot,port} field. A zero value in this field may indicate either a genuine zero value (i.e. slot 0 first port) or an older build. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/interface/bofm')
-rw-r--r--src/interface/bofm/bofm.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/interface/bofm/bofm.c b/src/interface/bofm/bofm.c
index dbb98dc4..63b25a55 100644
--- a/src/interface/bofm/bofm.c
+++ b/src/interface/bofm/bofm.c
@@ -306,11 +306,16 @@ int bofm ( userptr_t bofmtab, struct pci_device *pci ) {
en.slot, ( en.port + 1 ) );
continue;
}
+ DBG ( "BOFM: slot %d port %d%s is " PCI_FMT " mport %d\n",
+ en.slot, ( en.port + 1 ),
+ ( ( en.slot || en.port ) ? "" : "(?)" ),
+ PCI_BUS ( en.busdevfn ), PCI_SLOT ( en.busdevfn ),
+ PCI_FUNC ( en.busdevfn ), en.mport );
bofm = bofm_find_busdevfn ( en.busdevfn );
if ( ! bofm ) {
- DBG ( "BOFM: " PCI_FMT " ignored\n",
+ DBG ( "BOFM: " PCI_FMT " mport %d ignored\n",
PCI_BUS ( en.busdevfn ), PCI_SLOT ( en.busdevfn ),
- PCI_FUNC ( en.busdevfn ) );
+ PCI_FUNC ( en.busdevfn ), en.mport );
continue;
}
if ( ( rc = bofm_en ( bofm, &en ) ) == 0 ) {