[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-stable] [PATCH 05/43] uhci: Raise interrupt when requested even fo
From: |
Michael Roth |
Subject: |
[Qemu-stable] [PATCH 05/43] uhci: Raise interrupt when requested even for non active tds |
Date: |
Mon, 3 Dec 2012 16:08:29 -0600 |
From: Hans de Goede <address@hidden>
According to the spec we must raise an interrupt when one is requested
even for non active tds.
Linux depends on this, for bulk transfers it runs an inactivity timer
to work around a bug in early uhci revisions, when we take longer then
200 ms to process a packet, this timer goes of, and as part of the
handling Linux then unlinks the qh, and relinks it after the frindex
has increased by atleast 1, the problem is Linux only checks for the
frindex increases on an interrupt, and we don't send that, causing
the qh to go inactive for more then 32 frames, at which point we
consider the packet cancelled.
Signed-off-by: Hans de Goede <address@hidden>
Signed-off-by: Gerd Hoffmann <address@hidden>
(cherry picked from commit 883bca776daa43111e9c39008f0038f7c62ae723)
Signed-off-by: Michael Roth <address@hidden>
---
hw/usb/hcd-uhci.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c
index cdc8bc3..c2f08e3 100644
--- a/hw/usb/hcd-uhci.c
+++ b/hw/usb/hcd-uhci.c
@@ -826,8 +826,16 @@ static int uhci_handle_td(UHCIState *s, uint32_t addr,
UHCI_TD *td,
USBEndpoint *ep;
/* Is active ? */
- if (!(td->ctrl & TD_CTRL_ACTIVE))
+ if (!(td->ctrl & TD_CTRL_ACTIVE)) {
+ /*
+ * ehci11d spec page 22: "Even if the Active bit in the TD is already
+ * cleared when the TD is fetched ... an IOC interrupt is generated"
+ */
+ if (td->ctrl & TD_CTRL_IOC) {
+ *int_mask |= 0x01;
+ }
return TD_RESULT_NEXT_QH;
+ }
async = uhci_async_find_td(s, addr, td);
if (async) {
--
1.7.9.5
- [Qemu-stable] Patch Round-up for stable 1.2.2, freeze Wednesday, Michael Roth, 2012/12/03
- [Qemu-stable] [PATCH 02/43] fix CONFIG_QEMU_HELPERDIR generation again, Michael Roth, 2012/12/03
- [Qemu-stable] [PATCH 01/43] configure: Fix CONFIG_QEMU_HELPERDIR generation, Michael Roth, 2012/12/03
- [Qemu-stable] [PATCH 03/43] ui/vnc: Only report/use TIGHT_PNG encoding if enabled., Michael Roth, 2012/12/03
- [Qemu-stable] [PATCH 04/43] vnc: fix "info vnc" with "-vnc ..., reverse=on", Michael Roth, 2012/12/03
- [Qemu-stable] [PATCH 05/43] uhci: Raise interrupt when requested even for non active tds,
Michael Roth <=
- [Qemu-stable] [PATCH 06/43] hw/qxl: qxl_dirty_surfaces: use uintptr_t, Michael Roth, 2012/12/03
- [Qemu-stable] [PATCH 07/43] qxl: always update displaysurface on resize, Michael Roth, 2012/12/03
- [Qemu-stable] [PATCH 08/43] rtc: fix overflow in mktimegm, Michael Roth, 2012/12/03
- [Qemu-stable] [PATCH 09/43] hw: Fix return value check for bdrv_read, bdrv_write, Michael Roth, 2012/12/03
- [Qemu-stable] [PATCH 10/43] target-i386: Allow tsc-frequency to be larger then 2.147G, Michael Roth, 2012/12/03
- [Qemu-stable] [PATCH 11/43] e1000: drop check_rxov, always treat RX ring with RDH == RDT as empty, Michael Roth, 2012/12/03
- [Qemu-stable] [PATCH 12/43] memory: fix rendering of a region obscured by another, Michael Roth, 2012/12/03
- [Qemu-stable] [PATCH 13/43] s390x: fix -initrd in virtio machine, Michael Roth, 2012/12/03
- [Qemu-stable] [PATCH 14/43] PPC: Bamboo: Fix memory size DT property, Michael Roth, 2012/12/03
- [Qemu-stable] [PATCH 15/43] target-sparc64: disable VGA cirrus, Michael Roth, 2012/12/03