All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Hans de Goede <hdegoede@redhat.com>
Subject: [Qemu-devel] [PATCH for-1.2 10/11] ehci: Fix interrupt endpoints no longer working
Date: Fri, 31 Aug 2012 16:19:21 +0200	[thread overview]
Message-ID: <1346422762-15877-11-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1346422762-15877-1-git-send-email-kraxel@redhat.com>

From: Hans de Goede <hdegoede@redhat.com>

One of the recent changes (likely the addition of queuing support) has broken
interrupt endpoints, this patch fixes this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 hw/usb/hcd-ehci.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c
index eca1431..017342b 100644
--- a/hw/usb/hcd-ehci.c
+++ b/hw/usb/hcd-ehci.c
@@ -1987,10 +1987,19 @@ static int ehci_state_fetchqtd(EHCIQueue *q)
         ehci_set_state(q->ehci, q->async, EST_HORIZONTALQH);
         again = 1;
     } else if (p != NULL) {
-        if (p->async == EHCI_ASYNC_INFLIGHT) {
+        switch (p->async) {
+        case EHCI_ASYNC_NONE:
+            /* Previously nacked packet (likely interrupt ep) */
+           ehci_set_state(q->ehci, q->async, EST_EXECUTE);
+           break;
+        case EHCI_ASYNC_INFLIGHT:
+            /* Unfinyshed async handled packet, go horizontal */
             ehci_set_state(q->ehci, q->async, EST_HORIZONTALQH);
-        } else {
+            break;
+        case EHCI_ASYNC_FINISHED:
+            /* Should never happen, as this case is caught by fetchqh */
             ehci_set_state(q->ehci, q->async, EST_EXECUTING);
+            break;
         }
         again = 1;
     } else {
-- 
1.7.1

  parent reply	other threads:[~2012-08-31 14:19 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-31 14:19 [Qemu-devel] [PULL for-1.2 00/11] usb patch queue Gerd Hoffmann
2012-08-31 14:19 ` [Qemu-devel] [PATCH for-1.2 01/11] fix info qtree indention Gerd Hoffmann
2012-08-31 14:19 ` [Qemu-devel] [PATCH for-1.2 02/11] usb: Halt ep queue en cancel pending packets on a packet error Gerd Hoffmann
2012-09-01 10:42   ` Blue Swirl
2012-09-01 13:37     ` Hans de Goede
2012-09-01 14:12       ` Michael Roth
2012-09-01 18:47         ` Hans de Goede
2012-09-01 19:04           ` Peter Maydell
2012-09-01 20:07           ` Michael Roth
2012-08-31 14:19 ` [Qemu-devel] [PATCH for-1.2 03/11] usb: unique packet ids Gerd Hoffmann
2012-08-31 14:19 ` [Qemu-devel] [PATCH for-1.2 04/11] ehci: Fix NULL ptr deref when unplugging an USB dev with an iso stream active Gerd Hoffmann
2012-08-31 14:19 ` [Qemu-devel] [PATCH for-1.2 05/11] ehci: Schedule async-bh when IAAD bit gets set Gerd Hoffmann
2012-08-31 14:19 ` [Qemu-devel] [PATCH for-1.2 06/11] ehci: Remove unnecessary ehci_flush_qh call Gerd Hoffmann
2012-08-31 14:19 ` [Qemu-devel] [PATCH for-1.2 07/11] ehci: simplify ehci_state_executing Gerd Hoffmann
2012-08-31 14:19 ` [Qemu-devel] [PATCH for-1.2 08/11] ehci: add ehci_cancel_queue() Gerd Hoffmann
2012-08-31 14:19 ` [Qemu-devel] [PATCH for-1.2 09/11] ehci: handle TD deactivation of inflight packets Gerd Hoffmann
2012-08-31 14:19 ` Gerd Hoffmann [this message]
2012-08-31 14:19 ` [Qemu-devel] [PATCH for-1.2 11/11] uas: move transfer kickoff Gerd Hoffmann

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=1346422762-15877-11-git-send-email-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=hdegoede@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.