summaryrefslogtreecommitdiffstats
path: root/hw/usb
diff options
context:
space:
mode:
authorGerd Hoffmann2013-01-22 14:17:05 +0100
committerGerd Hoffmann2013-02-19 12:30:04 +0100
commit9db7c41419e89adee5650a5868ac91e83614abf5 (patch)
tree7fae1f4db50b033ca4b8bd39a2174c86143f15d6 /hw/usb
parentallow disabling usb smartcard support (diff)
downloadqemu-9db7c41419e89adee5650a5868ac91e83614abf5.tar.gz
qemu-9db7c41419e89adee5650a5868ac91e83614abf5.tar.xz
qemu-9db7c41419e89adee5650a5868ac91e83614abf5.zip
usb-storage: use scsi_req_enqueue return value
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb')
-rw-r--r--hw/usb/dev-storage.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c
index b89d00f7cf..d3f01aa2a7 100644
--- a/hw/usb/dev-storage.c
+++ b/hw/usb/dev-storage.c
@@ -400,6 +400,7 @@ static void usb_msd_handle_data(USBDevice *dev, USBPacket *p)
struct usb_msd_cbw cbw;
uint8_t devep = p->ep->nr;
SCSIDevice *scsi_dev;
+ uint32_t len;
switch (p->pid) {
case USB_TOKEN_OUT:
@@ -441,8 +442,8 @@ static void usb_msd_handle_data(USBDevice *dev, USBPacket *p)
#ifdef DEBUG_MSD
scsi_req_print(s->req);
#endif
- scsi_req_enqueue(s->req);
- if (s->req && s->req->cmd.xfer != SCSI_XFER_NONE) {
+ len = scsi_req_enqueue(s->req);
+ if (len) {
scsi_req_continue(s->req);
}
break;