vhost-user-scsi: reset the device if supported
commitf0472439383bb5bf5d760fb96e084beccbec03e4
authorRaphael Norwitz <raphael.norwitz@nutanix.com>
Tue, 29 Oct 2019 21:38:03 +0000 (29 17:38 -0400)
committerMichael S. Tsirkin <mst@redhat.com>
Sun, 5 Jan 2020 12:03:03 +0000 (5 07:03 -0500)
treead3ec94f1316ffc86137d31d5d93d7e5794b0a5d
parentd91d57e604edc128be302b60dabba6a34f0e0f0f
vhost-user-scsi: reset the device if supported

If the vhost-user-scsi backend supports the VHOST_USER_F_RESET_DEVICE
protocol feature, then the device can be reset when requested.

If this feature is not supported, do not try a reset as this will send
a VHOST_USER_RESET_OWNER that the backend is not expecting,
potentially putting into an inoperable state.

Signed-off-by: David Vrabel <david.vrabel@nutanix.com>
Signed-off-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Message-Id: <1572385083-5254-3-git-send-email-raphael.norwitz@nutanix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/scsi/vhost-user-scsi.c