aboutsummaryrefslogtreecommitdiff
path: root/hw/scsi/vhost-user-scsi.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/scsi/vhost-user-scsi.c')
-rw-r--r--hw/scsi/vhost-user-scsi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/scsi/vhost-user-scsi.c b/hw/scsi/vhost-user-scsi.c
index 4486500cac..2060f9f94b 100644
--- a/hw/scsi/vhost-user-scsi.c
+++ b/hw/scsi/vhost-user-scsi.c
@@ -147,7 +147,6 @@ static int vhost_user_scsi_connect(DeviceState *dev, Error **errp)
if (s->connected) {
return 0;
}
- s->connected = true;
vsc->dev.num_queues = vs->conf.num_queues;
vsc->dev.nvqs = VIRTIO_SCSI_VQ_NUM_FIXED + vs->conf.num_queues;
@@ -161,6 +160,8 @@ static int vhost_user_scsi_connect(DeviceState *dev, Error **errp)
return ret;
}
+ s->connected = true;
+
/* restore vhost state */
if (virtio_device_started(vdev, vdev->status)) {
ret = vhost_user_scsi_start(s, errp);