]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[intelxl] Read PCI bus:dev.fn number from PFFUNC_RID register
authorMichael Brown <mcb30@ipxe.org>
Sat, 21 Nov 2020 13:19:27 +0000 (13:19 +0000)
committerMichael Brown <mcb30@ipxe.org>
Sat, 21 Nov 2020 13:35:11 +0000 (13:35 +0000)
commit76a7bfe939b4b6ea88690e8c6960c65d57c01b5e
tree473a19a882a6cc0989d2c30a2cc52ba65c091236
parentb6eb17cbd790b8336a9a5fe1878008f905642c9b
[intelxl] Read PCI bus:dev.fn number from PFFUNC_RID register

For the physical function driver, the transmit queue needs to be
configured to be associated with the relevant physical function
number.  This is currently obtained from the bus:dev.fn address of the
underlying PCI device.

In the case of a virtual machine using the physical function via PCI
passthrough, the PCI bus:dev.fn address within the virtual machine is
unrelated to the real physical function number.  Such a function will
typically be presented to the virtual machine as a single-function
device.  The function number extracted from the PCI bus:dev.fn address
will therefore always be zero.

Fix by reading from the Function Requester ID Information Register,
which always returns the real PCI bus:dev.fn address as used by the
physical host.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/net/intelxl.c
src/drivers/net/intelxl.h