diff options
author | Zhu Lingshan <lingshan.zhu@intel.com> | 2021-04-19 09:33:24 +0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2021-05-03 11:55:54 +0300 |
commit | 26bfea1309f5d4faad33383d2d82a3463f518982 (patch) | |
tree | ccedc2b43fcf759c13d5e207a168b2d0e35755de /drivers/vdpa/ifcvf/ifcvf_base.h | |
parent | 899c4d187f6a5c11d8eae33506fa0736dbabc39f (diff) | |
download | linux-26bfea1309f5d4faad33383d2d82a3463f518982.tar.xz |
vDPA/ifcvf: deduce VIRTIO device ID when probe
This commit deduces VIRTIO device ID as device type when probe,
then ifcvf_vdpa_get_device_id() can simply return the ID.
ifcvf_vdpa_get_features() and ifcvf_vdpa_get_config_size()
can work properly based on the device ID.
Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com>
Link: https://lore.kernel.org/r/20210419063326.3748-2-lingshan.zhu@intel.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'drivers/vdpa/ifcvf/ifcvf_base.h')
-rw-r--r-- | drivers/vdpa/ifcvf/ifcvf_base.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/vdpa/ifcvf/ifcvf_base.h b/drivers/vdpa/ifcvf/ifcvf_base.h index b2eeb16b9c2c..1c04cd256fa7 100644 --- a/drivers/vdpa/ifcvf/ifcvf_base.h +++ b/drivers/vdpa/ifcvf/ifcvf_base.h @@ -84,6 +84,7 @@ struct ifcvf_hw { u32 notify_off_multiplier; u64 req_features; u64 hw_features; + u32 dev_type; struct virtio_pci_common_cfg __iomem *common_cfg; void __iomem *net_cfg; struct vring_info vring[IFCVF_MAX_QUEUE_PAIRS * 2]; |