vp_vdpa: allow set vq state to initial state after reset
authorJason Wang <jasowang@redhat.com>
Wed, 2 Jun 2021 02:15:35 +0000 (10:15 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 8 Jul 2021 11:49:02 +0000 (07:49 -0400)
commit1225c216d9542ed4883027d3af50035c35a7a03c
treea467011b704e1da6c6ee0f44aeb74e6fb7c1da8b
parent0140b3d07617e71a8d9509776434ced107572fc8
vp_vdpa: allow set vq state to initial state after reset

We used to fail the set_vq_state() since it was not supported yet by
the virtio spec. But if the bus tries to set the state which is equal
to the device initial state after reset, we can let it go.

This is a must for virtio_vdpa() to set vq state during probe which is
required for some vDPA parents.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Link: https://lore.kernel.org/r/20210602021536.39525-4-jasowang@redhat.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Eli Cohen <elic@nvidia.com>
drivers/vdpa/virtio_pci/vp_vdpa.c