From: Hans de Goede Date: Mon, 3 Sep 2012 10:17:48 +0000 (+0200) Subject: ehci: Correct a comment in fetchqtd packet processing X-Git-Tag: v1.3.0-rc0~550^2~38 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cf1f81691d1998fa8fe5bfcb8b498fb3723cf3c3;p=thirdparty%2Fqemu.git ehci: Correct a comment in fetchqtd packet processing Since my previous comment said "Should never happen", I tried changing the next line to an assert(0), which did not go well, which as the new comments explains is logical if you think about it for a moment. Signed-off-by: Hans de Goede Signed-off-by: Gerd Hoffmann --- diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c index 25343942024..2f3e9c03a19 100644 --- a/hw/usb/hcd-ehci.c +++ b/hw/usb/hcd-ehci.c @@ -2045,7 +2045,10 @@ static int ehci_state_fetchqtd(EHCIQueue *q) ehci_set_state(q->ehci, q->async, EST_HORIZONTALQH); break; case EHCI_ASYNC_FINISHED: - /* Should never happen, as this case is caught by fetchqh */ + /* + * We get here when advqueue moves to a packet which is already + * finished, which can happen with packets queued up by fill_queue + */ ehci_set_state(q->ehci, q->async, EST_EXECUTING); break; }