summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/usb/dev-storage.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c
index 976fe1acc5..ff48d91049 100644
--- a/hw/usb/dev-storage.c
+++ b/hw/usb/dev-storage.c
@@ -247,6 +247,9 @@ static void usb_msd_command_complete(SCSIRequest *req, uint32_t status, size_t r
the status read packet. */
usb_msd_send_status(s, p);
s->mode = USB_MSDM_CBW;
+ } else if (s->mode == USB_MSDM_CSW) {
+ usb_msd_send_status(s, p);
+ s->mode = USB_MSDM_CBW;
} else {
if (s->data_len) {
int len = (p->iov.size - p->result);