diff options
author | Zhu Lingshan <lingshan.zhu@intel.com> | 2021-03-17 12:49:31 +0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2021-05-03 11:55:52 +0300 |
commit | 69d00d9858c7451a1e3fc556ece211533fb85b64 (patch) | |
tree | 53cec34bc9a865124207384b29cc09be6efbb873 /drivers/vdpa/ifcvf/ifcvf_main.c | |
parent | 2f1b305070393151d3997217a4452ef99bdb48cc (diff) | |
download | linux-69d00d9858c7451a1e3fc556ece211533fb85b64.tar.xz |
vDPA/ifcvf: fetch device feature bits when probe
This commit would read and store device feature
bits when probe.
rename ifcvf_get_features() to ifcvf_get_hw_features(),
it reads and stores features of the probed device.
new ifcvf_get_features() simply returns stored
feature bits.
Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Link: https://lore.kernel.org/r/20210317094933.16417-6-lingshan.zhu@intel.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/vdpa/ifcvf/ifcvf_main.c')
-rw-r--r-- | drivers/vdpa/ifcvf/ifcvf_main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c index d3d42c431e69..fae664d92aff 100644 --- a/drivers/vdpa/ifcvf/ifcvf_main.c +++ b/drivers/vdpa/ifcvf/ifcvf_main.c @@ -457,6 +457,8 @@ static int ifcvf_probe(struct pci_dev *pdev, const struct pci_device_id *id) for (i = 0; i < IFCVF_MAX_QUEUE_PAIRS * 2; i++) vf->vring[i].irq = -EINVAL; + vf->hw_features = ifcvf_get_hw_features(vf); + ret = vdpa_register_device(&adapter->vdpa, IFCVF_MAX_QUEUE_PAIRS * 2); if (ret) { IFCVF_ERR(pdev, "Failed to register ifcvf to vdpa bus"); |