usb passthrough mass storage write data corruption

Bug #1247478 reported by Sascha Krissler
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Expired
Undecided
Unassigned

Bug Description

the windows 7 professional guest writes to usb high speed mass storage devices connected via host-libusb
in bulk packages of either size 20480 or 4096 (as far as the actual file data is concerned and
except for the last packet for odd-sized files). The pattern is:
3 times bulk out 20480
1 time bulk out 4096

and that repeats for files longer than 65536 bytes.

the file on the usb disk is corrupted and it is always corrupt in the last 4096 bytes of each
20480 byte sized transfer. that means a file is corrupt at 16384-20480 and 36864-40960 and
57344-61440.
and so on. and because the 4096 sized bulk out is always error free, the next corrupt span is from
81920-86016.

the last 4096 bytes of the 20480 sized transfer is always identical to the first 4096 bytes of the same
transfer.

to reproduce: run windows7 guest on and pass through usb2.0 disk with host-libusb. write a large file.
(possibly check the bulk transfer sizes with usbmon).
note that attaching usb disks with hw/usb/dev-storage does work just fine.
cannot reproduce with linux as it always writes just 4096 bytes and writes with a linux guest are
always ok even with usb passthrough.

Revision history for this message
Sascha Krissler (sascha-v) wrote :

it is apparently not a qemu bug, but either a libusb or (more likely) linux bug.
it happens on linux 3.6 but not linux 3.4, with the difference of:
(USBFS_CAP_NO_PACKET_SIZE_LIM | USBFS_CAP_BULK_SCATTER_GATHER)
added to the hcd capabilities bitfield in 3.6

Revision history for this message
Thomas Huth (th-huth) wrote :

Triaging old bug tickets... can you still reproduce this issue with the latest version of QEMU? Or could we close this ticket nowadays? Did you report it to the libusb folks?

Thomas Huth (th-huth)
Changed in qemu:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for QEMU because there has been no activity for 60 days.]

Changed in qemu:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.