From: Hans de Goede <hdegoede@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] 2 issues with qemu-master / 1.2 ehci code
Date: Fri, 17 Aug 2012 09:16:39 +0200 [thread overview]
Message-ID: <502DEFD7.7020103@redhat.com> (raw)
In-Reply-To: <502DED95.8040409@redhat.com>
Hi,
On 08/17/2012 09:07 AM, Gerd Hoffmann wrote:
> Hi,
>
>> 2) happens when a packet fails, and the queue should be halted, in
>> this case
>
> Should we just cancel all queued packets on endpoint halts then? If the
> guest decides to go on we'll easily re-queue everything (with the
> existing code). If the guest does something else we don't have to do
> anything special.
>
> Not canceling, then trying to figure what the new state of the already
> queued packets is could become tricky ...
>
Yeah, actually I've come to the same conclusion, after wasting almost a day
trying to get things to work the "figure what the new state of the already
queued packets is" way, and that indeed is not the way to go!
Spo I've just written a patch cancelling all the queued up packets, testing
that now :)
>> Another problem with failing packets is that hw/usb/core.c will
>> happily execute the next packet in the ep queue, even though the spec
>> says the ep-queue should be halted, giving the guest a chance to
>> cancel transfers after the failed one without them ever executing.
>> I've a poc patch fixing this too.
>
> Indeed, the core should stop processing them. Question is what to do
> then. If the host controller cancels all packets anyway we don't have
> to do much extra work on the core. Just stop processing on error and
> implicitly un-halt the endpoint when the queue becomes empty. Maybe
> some extra state tracking and asserts() to catch bugs.
Right, also done in my wip patch. I'll go test it, then split it up in
multiple patches and then submit. We really should get this in 1.2 btw!
prev parent reply other threads:[~2012-08-17 7:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-14 16:12 [Qemu-devel] 2 issues with qemu-master / 1.2 ehci code Hans de Goede
2012-08-15 11:22 ` Hans de Goede
2012-08-15 11:37 ` Gerd Hoffmann
2012-08-16 13:46 ` Hans de Goede
2012-08-16 19:26 ` Gerd Hoffmann
2012-08-17 6:31 ` Hans de Goede
2012-08-17 7:07 ` Gerd Hoffmann
2012-08-17 7:16 ` Hans de Goede [this message]
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=502DEFD7.7020103@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).