* [Qemu-devel] [STABLE PULL] usb storage fix
@ 2011-05-10 9:08 Gerd Hoffmann
2011-05-10 9:08 ` [Qemu-devel] [PATCH] usb: mass " Gerd Hoffmann
0 siblings, 1 reply; 2+ messages in thread
From: Gerd Hoffmann @ 2011-05-10 9:08 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
Hi,
This is the usb storage fix cherry-picked into the stable branch.
please pull,
Gerd
The following changes since commit 56a60dd6d619877e9957ba06b92d2f276e3c229d:
Version 0.14.1 (2011-05-04 13:50:56 -0500)
are available in the git repository at:
git://git.kraxel.org/qemu usb.stable.14
Gerd Hoffmann (1):
usb: mass storage fix
hw/usb-msd.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Qemu-devel] [PATCH] usb: mass storage fix
2011-05-10 9:08 [Qemu-devel] [STABLE PULL] usb storage fix Gerd Hoffmann
@ 2011-05-10 9:08 ` Gerd Hoffmann
0 siblings, 0 replies; 2+ messages in thread
From: Gerd Hoffmann @ 2011-05-10 9:08 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
Initialize scsi_len with zero when starting a new request, so any
stuff leftover from the previous request is cleared out. This may
happen in case the data returned by the scsi command doesn't fit
into the buffer provided by the guest.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit ef0bdf77d7070494692cbccd80c4c8f08c85c240)
---
hw/usb-msd.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/hw/usb-msd.c b/hw/usb-msd.c
index 76f5b02..d73216e 100644
--- a/hw/usb-msd.c
+++ b/hw/usb-msd.c
@@ -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. */
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-05-10 9:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-10 9:08 [Qemu-devel] [STABLE PULL] usb storage fix Gerd Hoffmann
2011-05-10 9:08 ` [Qemu-devel] [PATCH] usb: mass " Gerd Hoffmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).