qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 0/4] RFC: usb: split packet result into actual_length + status
Date: Thu, 18 Oct 2012 16:05:52 +0200	[thread overview]
Message-ID: <1350569156-2565-1-git-send-email-hdegoede@redhat.com> (raw)

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

             reply	other threads:[~2012-10-18 14:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-18 14:05 Hans de Goede [this message]
2012-10-18 14:05 ` [Qemu-devel] [PATCH 1/4] usb: split packet result into actual_length + status 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1350569156-2565-1-git-send-email-hdegoede@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).