david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

[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>
This commit is contained in:
Michael Brown 2011-05-04 12:04:14 +01:00
parent 7fc1a0a1c5
commit bfd8b3bff9
1 changed files with 7 additions and 2 deletions

View File

@ -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 ) {