[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 08/14] ehci: Don't verify the next pointer for perio
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PATCH 08/14] ehci: Don't verify the next pointer for periodic qh-s and qtd-s |
Date: |
Fri, 16 Nov 2012 14:44:41 +0100 |
From: Hans de Goede <address@hidden>
While testing the move to async packet handling for interrupt endpoints I
noticed that Windows-XP likes to play tricks with the next pointer for
periodic qh-s, so we should not fail qh / qtd verification when it changes.
Signed-off-by: Hans de Goede <address@hidden>
Signed-off-by: Gerd Hoffmann <address@hidden>
---
hw/usb/hcd-ehci.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c
index 89b7520..287a066 100644
--- a/hw/usb/hcd-ehci.c
+++ b/hw/usb/hcd-ehci.c
@@ -1550,8 +1550,10 @@ static EHCIQueue *ehci_state_fetchqh(EHCIState *ehci,
int async)
endp = get_field(qh.epchar, QH_EPCHAR_EP);
if ((devaddr != get_field(q->qh.epchar, QH_EPCHAR_DEVADDR)) ||
(endp != get_field(q->qh.epchar, QH_EPCHAR_EP)) ||
- (memcmp(&qh.current_qtd, &q->qh.current_qtd,
- 9 * sizeof(uint32_t)) != 0) ||
+ (qh.current_qtd != q->qh.current_qtd) ||
+ (q->async && qh.next_qtd != q->qh.next_qtd) ||
+ (memcmp(&qh.altnext_qtd, &q->qh.altnext_qtd,
+ 7 * sizeof(uint32_t)) != 0) ||
(q->dev != NULL && q->dev->addr != devaddr)) {
if (ehci_reset_queue(q) > 0) {
ehci_trace_guest_bug(ehci, "guest updated active QH");
@@ -1719,7 +1721,8 @@ static int ehci_state_fetchqtd(EHCIQueue *q)
p = QTAILQ_FIRST(&q->packets);
if (p != NULL) {
if (p->qtdaddr != q->qtdaddr ||
- (!NLPTR_TBIT(p->qtd.next) && (p->qtd.next != qtd.next)) ||
+ (q->async && !NLPTR_TBIT(p->qtd.next) &&
+ (p->qtd.next != qtd.next)) ||
(!NLPTR_TBIT(p->qtd.altnext) && (p->qtd.altnext != qtd.altnext)) ||
p->qtd.bufptr[0] != qtd.bufptr[0]) {
ehci_cancel_queue(q);
--
1.7.1
- [Qemu-devel] [PATCH 05/14] ehci: Don't access packet after freeing it, (continued)
- [Qemu-devel] [PATCH 05/14] ehci: Don't access packet after freeing it, Gerd Hoffmann, 2012/11/16
- [Qemu-devel] [PATCH 09/14] ehci: keep the frame timer running in case the guest asked for frame list rollover interrupts, Gerd Hoffmann, 2012/11/16
- [Qemu-devel] [PATCH 07/14] ehci: Better detection for qtd-s linked in circles, Gerd Hoffmann, 2012/11/16
- [Qemu-devel] [PATCH 12/14] usb-redir: Set default debug level to warning, Gerd Hoffmann, 2012/11/16
- [Qemu-devel] [PATCH 13/14] usb-host: update tracing, Gerd Hoffmann, 2012/11/16
- [Qemu-devel] [PATCH 11/14] usb-redir: Only add actually in flight packets to the in flight queue, Gerd Hoffmann, 2012/11/16
- [Qemu-devel] [PATCH 14/14] usb-host: fix splitted transfers, Gerd Hoffmann, 2012/11/16
- [Qemu-devel] [PATCH 04/14] usb: host-linux: Ignore parsing errors of the device descriptors, Gerd Hoffmann, 2012/11/16
- [Qemu-devel] [PATCH 10/14] ehci: handle dma errors, Gerd Hoffmann, 2012/11/16
- [Qemu-devel] [PATCH 02/14] usb: Fix (another) bug in usb_packet_map() for IOMMU handling, Gerd Hoffmann, 2012/11/16
- [Qemu-devel] [PATCH 08/14] ehci: Don't verify the next pointer for periodic qh-s and qtd-s,
Gerd Hoffmann <=