vDPA/ifcvf: deduce VIRTIO device ID when probe
authorZhu Lingshan <lingshan.zhu@intel.com>
Mon, 19 Apr 2021 06:33:24 +0000 (14:33 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 3 May 2021 08:55:54 +0000 (04:55 -0400)
commit26bfea1309f5d4faad33383d2d82a3463f518982
treeccedc2b43fcf759c13d5e207a168b2d0e35755de
parent899c4d187f6a5c11d8eae33506fa0736dbabc39f
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>
drivers/vdpa/ifcvf/ifcvf_base.h
drivers/vdpa/ifcvf/ifcvf_main.c