Blame 0141-ehci-Correct-a-comment-in-fetchqtd-packet-processing.patch

5544c1
From e598e28401bb25d4d639b29f297a549badbf0cfa Mon Sep 17 00:00:00 2001
Hans de Goede c8dfc6
From: Hans de Goede <hdegoede@redhat.com>
Hans de Goede c8dfc6
Date: Mon, 3 Sep 2012 12:17:48 +0200
5544c1
Subject: [PATCH] ehci: Correct a comment in fetchqtd packet processing
Hans de Goede c8dfc6
Hans de Goede c8dfc6
Since my previous comment said "Should never happen", I tried changing the
Hans de Goede c8dfc6
next line to an assert(0), which did not go well, which as the new comments
Hans de Goede c8dfc6
explains is logical if you think about it for a moment.
Hans de Goede c8dfc6
Hans de Goede c8dfc6
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Hans de Goede c8dfc6
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
5544c1
(cherry picked from commit cf1f81691d1998fa8fe5bfcb8b498fb3723cf3c3)
5544c1
5544c1
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Hans de Goede c8dfc6
---
Hans de Goede c8dfc6
 hw/usb/hcd-ehci.c | 5 ++++-
Hans de Goede c8dfc6
 1 file changed, 4 insertions(+), 1 deletion(-)
Hans de Goede c8dfc6
Hans de Goede c8dfc6
diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c
Hans de Goede c8dfc6
index 2534394..2f3e9c0 100644
Hans de Goede c8dfc6
--- a/hw/usb/hcd-ehci.c
Hans de Goede c8dfc6
+++ b/hw/usb/hcd-ehci.c
Hans de Goede c8dfc6
@@ -2045,7 +2045,10 @@ static int ehci_state_fetchqtd(EHCIQueue *q)
Hans de Goede c8dfc6
             ehci_set_state(q->ehci, q->async, EST_HORIZONTALQH);
Hans de Goede c8dfc6
             break;
Hans de Goede c8dfc6
         case EHCI_ASYNC_FINISHED:
Hans de Goede c8dfc6
-            /* Should never happen, as this case is caught by fetchqh */
Hans de Goede c8dfc6
+            /*
Hans de Goede c8dfc6
+             * We get here when advqueue moves to a packet which is already
Hans de Goede c8dfc6
+             * finished, which can happen with packets queued up by fill_queue
Hans de Goede c8dfc6
+             */
Hans de Goede c8dfc6
             ehci_set_state(q->ehci, q->async, EST_EXECUTING);
Hans de Goede c8dfc6
             break;
Hans de Goede c8dfc6
         }
Hans de Goede c8dfc6
-- 
5544c1
1.7.12.1
Hans de Goede c8dfc6