qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/4] RFC: usb: split packet result into actual_length + status
@ 2012-10-18 14:05 Hans de Goede
  2012-10-18 14:05 ` [Qemu-devel] [PATCH 1/4] " Hans de Goede
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Hans de Goede @ 2012-10-18 14:05 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: qemu-devel

With the ehci and xhci controllers a single packet can be larger then
maxpacketsize, making it possible for the result of a single packet
to be both having transferred some data as well as the transfer to have
an error.

An example would be an input transfer from a bulk endpoint successfully
receiving 1 or more maxpacketsize packets from the device, followed
by a packet signalling halt.

In practice this will almost never happen, still I believe it is worth
to fix this, as this could happen under normal circumstances if for example
a redirected usb mass storage device has shorter then requested scsi cmd
or sense data, which is exactly a multiple of maxpacketsize. The former
(shorter then requested data) is actually quite normal, but the exact
a multiple of maxpacketsize is rather rare, which is why sofar we've not
been bitten by this.

Also as the patches which modify the hcd / redirect code show, having the
length in a seperate field also leads to cleaner code (IMHO).

Note: This patch series applies on top of the input pipelining patch series.

Regards,

Hans

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-10-31 12:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-18 14:05 [Qemu-devel] [PATCH 0/4] RFC: usb: split packet result into actual_length + status Hans de Goede
2012-10-18 14:05 ` [Qemu-devel] [PATCH 1/4] " Hans de Goede
2012-10-19  9:00   ` Gerd Hoffmann
2012-10-19 10:21     ` Hans de Goede
2012-10-31 13:01     ` Hans de Goede
2012-10-18 14:05 ` [Qemu-devel] [PATCH 2/4] usb-redir: Allow packets to have both data and an error-status Hans de Goede
2012-10-18 14:05 ` [Qemu-devel] [PATCH 3/4] ehci: Add support for packets with both data and an error status Hans de Goede
2012-10-18 14:05 ` [Qemu-devel] [PATCH 4/4] xhci: " Hans de Goede

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).