projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e315bfd
)
usb-storage: fill csw on cancel
author
Gerd Hoffmann
<kraxel@redhat.com>
Thu, 5 Nov 2020 13:41:10 +0000
(14:41 +0100)
committer
Gerd Hoffmann
<kraxel@redhat.com>
Mon, 16 Nov 2020 08:11:21 +0000
(09:11 +0100)
When scsi requests are canceled fill the csw
(command status word) accordingly.
Buglink:
https://bugs.launchpad.net/qemu/+bug/1901981
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id:
20201105134112
.25119-5-kraxel@redhat.com
hw/usb/dev-storage.c
patch
|
blob
|
history
diff --git
a/hw/usb/dev-storage.c
b/hw/usb/dev-storage.c
index 360e8ca8f2bd378b979e18df2382d57f45692a9b..f0f005869d25976cc4d5d2394237967c4cf506a4 100644
(file)
--- a/
hw/usb/dev-storage.c
+++ b/
hw/usb/dev-storage.c
@@
-327,6
+327,10
@@
static void usb_msd_request_cancelled(SCSIRequest *req)
trace_usb_msd_cmd_cancel(req->tag);
if (req == s->req) {
+ s->csw.sig = cpu_to_le32(0x53425355);
+ s->csw.tag = cpu_to_le32(req->tag);
+ s->csw.status = 1; /* error */
+
scsi_req_unref(s->req);
s->req = NULL;
s->scsi_len = 0;