Commit 54414218 authored by Gerd Hoffmann's avatar Gerd Hoffmann
Browse files

usb-storage: fix SYNCHRONIZE_CACHE

Commit 59310659

 is incomplete,
we'll arrive in the scsi command complete callback in CSW state
and must handle that case correctly.
Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
parent 06f9847d
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment