[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:
parent
7fc1a0a1c5
commit
bfd8b3bff9
@ -306,11 +306,16 @@ int bofm ( userptr_t bofmtab, struct pci_device *pci ) {
|
|||||||
en.slot, ( en.port + 1 ) );
|
en.slot, ( en.port + 1 ) );
|
||||||
continue;
|
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 );
|
bofm = bofm_find_busdevfn ( en.busdevfn );
|
||||||
if ( ! bofm ) {
|
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_BUS ( en.busdevfn ), PCI_SLOT ( en.busdevfn ),
|
||||||
PCI_FUNC ( en.busdevfn ) );
|
PCI_FUNC ( en.busdevfn ), en.mport );
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ( ( rc = bofm_en ( bofm, &en ) ) == 0 ) {
|
if ( ( rc = bofm_en ( bofm, &en ) ) == 0 ) {
|
||||||
|
Reference in New Issue
Block a user