提交 54414218 编写于 作者: G Gerd Hoffmann

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: NGerd Hoffmann <kraxel@redhat.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册