[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 06/32] ehci: Verify qtd for async completed packets
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PATCH 06/32] ehci: Verify qtd for async completed packets |
Date: |
Tue, 8 Jan 2013 14:14:28 +0100 |
From: Hans de Goede <address@hidden>
Remove the short-circuiting of fetchqtd in fetchqh, so that the
qtd gets properly verified before completing the transaction.
Signed-off-by: Hans de Goede <address@hidden>
Signed-off-by: Gerd Hoffmann <address@hidden>
---
hw/usb/hcd-ehci.c | 15 +--------------
1 files changed, 1 insertions(+), 14 deletions(-)
diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c
index 96a0144..dde2ff3 100644
--- a/hw/usb/hcd-ehci.c
+++ b/hw/usb/hcd-ehci.c
@@ -1603,7 +1603,6 @@ out:
static EHCIQueue *ehci_state_fetchqh(EHCIState *ehci, int async)
{
uint32_t entry;
- EHCIPacket *p;
EHCIQueue *q;
EHCIqh qh;
@@ -1612,7 +1611,6 @@ static EHCIQueue *ehci_state_fetchqh(EHCIState *ehci, int
async)
if (NULL == q) {
q = ehci_alloc_queue(ehci, entry, async);
}
- p = QTAILQ_FIRST(&q->packets);
q->seen++;
if (q->seen > 1) {
@@ -1637,7 +1635,6 @@ static EHCIQueue *ehci_state_fetchqh(EHCIState *ehci, int
async)
if (ehci_reset_queue(q) > 0) {
ehci_trace_guest_bug(ehci, "guest updated active QH");
}
- p = NULL;
}
q->qh = qh;
@@ -1651,13 +1648,6 @@ static EHCIQueue *ehci_state_fetchqh(EHCIState *ehci,
int async)
get_field(q->qh.epchar, QH_EPCHAR_DEVADDR));
}
- if (p && p->async == EHCI_ASYNC_FINISHED) {
- /* I/O finished -- continue processing queue */
- trace_usb_ehci_packet_action(p->queue, p, "complete");
- ehci_set_state(ehci, async, EST_EXECUTING);
- goto out;
- }
-
if (async && (q->qh.epchar & QH_EPCHAR_H)) {
/* EHCI spec version 1.0 Section 4.8.3 & 4.10.1 */
@@ -1834,10 +1824,7 @@ static int ehci_state_fetchqtd(EHCIQueue *q)
ehci_set_state(q->ehci, q->async, EST_HORIZONTALQH);
break;
case EHCI_ASYNC_FINISHED:
- /*
- * We get here when advqueue moves to a packet which is already
- * finished, which can happen with packets queued up by fill_queue
- */
+ /* Complete executing of the packet */
ehci_set_state(q->ehci, q->async, EST_EXECUTING);
break;
}
--
1.7.1
- [Qemu-devel] [PULL 00/32] usb patch queue, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 04/32] ehci: Move get / put_dwords upwards, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 03/32] ehci: Verify guest does not change the token of inflight qtd-s, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 05/32] ehci: writeback_async_complete_packet: verify qh and qtd, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 11/32] ehci: Don't call commit_irq after raising PCD, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 12/32] uhci: Fix 1 ms delay in interrupt reporting to the guest, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 14/32] uhci: Add a QH_VALID define, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 21/32] usbredir: Add USBEP2I and I2USBEP helper macros, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 01/32] ehci: Add a ehci_writeback_async_complete_packet helper function, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 29/32] usb/ehci: Add SysBus EHCI device for Exynos4210, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 06/32] ehci: Verify qtd for async completed packets,
Gerd Hoffmann <=
- [Qemu-devel] [PATCH 26/32] xhci: call set-address with dummy usbpacket, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 13/32] uhci: Fix pending interrupts getting lost on migration, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 15/32] uhci: Limit amount of frames processed in one go, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 23/32] usbredir: Verify we have 32 bits bulk length cap when redirecting to xhci, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 30/32] exynos4210: Add EHCI support, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 20/32] usbredir: Add an usbredir_stop_ep helper function, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 22/32] usbredir: Add ep_stopped USBDevice method, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 32/32] uhci: stop using portio lists, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 28/32] usb/ehci: Move capsbase and opregbase into SysBus EHCI class, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 24/32] usbredir: Add usbredir_init_endpoints() helper, Gerd Hoffmann, 2013/01/08