summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/irdma/main.c
diff options
context:
space:
mode:
authorMustafa Ismail <mustafa.ismail@intel.com>2022-02-25 10:32:10 -0600
committerJason Gunthorpe <jgg@nvidia.com>2022-02-28 12:07:40 -0400
commitb200189626b5cefbaf8be9cadd7a28215e065bb9 (patch)
tree4cc7fcfff58fd5e21462a2aeb6541ca2964346c4 /drivers/infiniband/hw/irdma/main.c
parent6702bc14744847842a87fed21a795b6e8bab6965 (diff)
downloadlinux-stable-b200189626b5cefbaf8be9cadd7a28215e065bb9.tar.gz
linux-stable-b200189626b5cefbaf8be9cadd7a28215e065bb9.tar.bz2
linux-stable-b200189626b5cefbaf8be9cadd7a28215e065bb9.zip
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>
Diffstat (limited to 'drivers/infiniband/hw/irdma/main.c')
-rw-r--r--drivers/infiniband/hw/irdma/main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/irdma/main.c b/drivers/infiniband/hw/irdma/main.c
index babbe8ad5afa..4f4c3454bc43 100644
--- a/drivers/infiniband/hw/irdma/main.c
+++ b/drivers/infiniband/hw/irdma/main.c
@@ -231,6 +231,7 @@ static void irdma_fill_device_info(struct irdma_device *iwdev, struct ice_pf *pf
rf->hw.hw_addr = pf->hw.hw_addr;
rf->pcidev = pf->pdev;
rf->msix_count = pf->num_rdma_msix;
+ rf->pf_id = pf->hw.pf_id;
rf->msix_entries = &pf->msix_entries[pf->rdma_base_vector];
rf->default_vsi.vsi_idx = vsi->vsi_num;
rf->protocol_used = pf->rdma_mode & IIDC_RDMA_PROTOCOL_ROCEV2 ?