[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 22/60] uhci: Raise interrupt when requested even for
From: |
Michael Tokarev |
Subject: |
[Qemu-devel] [PATCH 22/60] uhci: Raise interrupt when requested even for non active tds |
Date: |
Mon, 4 Feb 2013 14:40:32 +0400 |
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 Tokarev <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 3803f52..a8bb164 100644
--- a/hw/usb/hcd-uhci.c
+++ b/hw/usb/hcd-uhci.c
@@ -806,8 +806,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.10.4
- [Qemu-devel] Patch queue for qemu-1.1.3 stable release, Michael Tokarev, 2013/02/04
- [Qemu-devel] [PATCH 01/60] tcg/s390: fix ld/st with CONFIG_TCG_PASS_AREG0, Michael Tokarev, 2013/02/04
- [Qemu-devel] [PATCH 02/60] qemu-char: BUGFIX, don't call FD_ISSET with negative fd, Michael Tokarev, 2013/02/04
- [Qemu-devel] [PATCH 05/60] fix CONFIG_QEMU_HELPERDIR generation again, Michael Tokarev, 2013/02/04
- [Qemu-devel] [PATCH 03/60] use --libexecdir instead of ignoring it first and reinventing it later, Michael Tokarev, 2013/02/04
- [Qemu-devel] [PATCH 04/60] configure: Fix CONFIG_QEMU_HELPERDIR generation, Michael Tokarev, 2013/02/04
- [Qemu-devel] [PATCH 22/60] uhci: Raise interrupt when requested even for non active tds,
Michael Tokarev <=
- [Qemu-devel] [PATCH 54/60] hw/arm_boot.c: Consistently use ram_size from arm_boot_info struct, Michael Tokarev, 2013/02/04
- [Qemu-devel] [PATCH 29/60] usb-storage: fix SYNCHRONIZE_CACHE, Michael Tokarev, 2013/02/04
- [Qemu-devel] [PATCH 23/60] hw/qxl: qxl_dirty_surfaces: use uintptr_t, Michael Tokarev, 2013/02/04
- [Qemu-devel] [PATCH 41/60] mips/malta: fix CBUS UART interrupt pin, Michael Tokarev, 2013/02/04
- [Qemu-devel] [PATCH 10/60] pcie_aer: clear cmask for Advanced Error Interrupt Message Number, Michael Tokarev, 2013/02/04
- [Qemu-devel] [PATCH 48/60] ide: Fix crash with too long PRD, Michael Tokarev, 2013/02/04
- [Qemu-devel] [PATCH 35/60] s390x: fix -initrd in virtio machine, Michael Tokarev, 2013/02/04