RDMA/irdma: Fix Passthrough mode in VM
authorMustafa Ismail <mustafa.ismail@intel.com>
Fri, 25 Feb 2022 16:32:10 +0000 (10:32 -0600)
committerJason Gunthorpe <jgg@nvidia.com>
Mon, 28 Feb 2022 16:07:40 +0000 (12:07 -0400)
commitb200189626b5cefbaf8be9cadd7a28215e065bb9
tree4cc7fcfff58fd5e21462a2aeb6541ca2964346c4
parent6702bc14744847842a87fed21a795b6e8bab6965
RDMA/irdma: Fix Passthrough mode in VM

Using PCI_FUNC macro in a VM, when the device is in passthrough mode does
not provide the real function instance. This means that currently, devices
will not probe unless the instance in the VM matches the instance in the
host.

Fix this by getting the pf_id from the LAN during the probe.

Fixes: 8498a30e1b94 ("RDMA/irdma: Register auxiliary driver and implement private channel OPs")
Link: https://lore.kernel.org/r/20220225163211.127-3-shiraz.saleem@intel.com
Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com>
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/irdma/hw.c
drivers/infiniband/hw/irdma/i40iw_if.c
drivers/infiniband/hw/irdma/main.c
drivers/infiniband/hw/irdma/main.h