diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2011-05-05 13:04:57 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-05-05 13:04:57 -0500 |
commit | a69fb35079f682f99dd4d077b76232763d832d42 (patch) | |
tree | 5275bd5b172eea2db7b9490d49c0d43de174e807 /hw/usb-msd.c | |
parent | 196a778428989217b82de042725dc8eb29c8f8d8 (diff) | |
parent | ef0bdf77d7070494692cbccd80c4c8f08c85c240 (diff) |
Merge remote-tracking branch 'kraxel/usb.7.pull' into staging
Diffstat (limited to 'hw/usb-msd.c')
-rw-r--r-- | hw/usb-msd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/usb-msd.c b/hw/usb-msd.c index 947fd3f83c..bd1c3a415f 100644 --- a/hw/usb-msd.c +++ b/hw/usb-msd.c @@ -241,7 +241,7 @@ static void usb_msd_command_complete(SCSIBus *bus, int reason, uint32_t tag, s->mode = USB_MSDM_CSW; } s->packet = NULL; - usb_packet_complete(p); + usb_packet_complete(&s->dev, p); } else if (s->data_len == 0) { s->mode = USB_MSDM_CSW; } @@ -257,7 +257,7 @@ static void usb_msd_command_complete(SCSIBus *bus, int reason, uint32_t tag, usb_packet_complete returns. */ DPRINTF("Packet complete %p\n", p); s->packet = NULL; - usb_packet_complete(p); + usb_packet_complete(&s->dev, p); } } } @@ -364,6 +364,7 @@ static int usb_msd_handle_data(USBDevice *dev, USBPacket *p) DPRINTF("Command tag 0x%x flags %08x len %d data %d\n", s->tag, cbw.flags, cbw.cmd_len, s->data_len); s->residue = 0; + s->scsi_len = 0; s->scsi_dev->info->send_command(s->scsi_dev, s->tag, cbw.cmd, 0); /* ??? Should check that USB and SCSI data transfer directions match. */ |