|
|
5544c1 |
From c84ed39e601ff69d93e0ad81d92cb7234ad5d4cd Mon Sep 17 00:00:00 2001
|
|
Hans de Goede |
93b7e3 |
From: Hans de Goede <hdegoede@redhat.com>
|
|
|
5544c1 |
Date: Mon, 10 Sep 2012 12:44:10 +0200
|
|
|
5544c1 |
Subject: [PATCH] ehci: Fix interrupts stopping when Interrupt Threshold
|
|
|
5544c1 |
Control is 8
|
|
Hans de Goede |
93b7e3 |
|
|
Hans de Goede |
93b7e3 |
If Interrupt Threshold Control is 8 or a multiple of 8, then
|
|
Hans de Goede |
93b7e3 |
s->usbsts_frindex can become exactly 0x4000, at which point
|
|
Hans de Goede |
93b7e3 |
(s->usbsts_frindex > s->frindex) will never become true, as
|
|
Hans de Goede |
93b7e3 |
s->usbsts_frindex will not be lowered / reset in this case.
|
|
Hans de Goede |
93b7e3 |
|
|
Hans de Goede |
93b7e3 |
This patch fixes this.
|
|
Hans de Goede |
93b7e3 |
|
|
Hans de Goede |
93b7e3 |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
5544c1 |
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
5544c1 |
(cherry picked from commit ffa1f2e088eb7e3d57f2fc35f21e7bdb23e592c5)
|
|
|
5544c1 |
|
|
|
5544c1 |
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
|
|
Hans de Goede |
93b7e3 |
---
|
|
Hans de Goede |
93b7e3 |
hw/usb/hcd-ehci.c | 2 +-
|
|
Hans de Goede |
93b7e3 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
Hans de Goede |
93b7e3 |
|
|
Hans de Goede |
93b7e3 |
diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c
|
|
Hans de Goede |
93b7e3 |
index f5ba8e1..54273d7 100644
|
|
Hans de Goede |
93b7e3 |
--- a/hw/usb/hcd-ehci.c
|
|
Hans de Goede |
93b7e3 |
+++ b/hw/usb/hcd-ehci.c
|
|
Hans de Goede |
93b7e3 |
@@ -2413,7 +2413,7 @@ static void ehci_update_frindex(EHCIState *ehci, int frames)
|
|
Hans de Goede |
93b7e3 |
if (ehci->frindex == 0x00004000) {
|
|
Hans de Goede |
93b7e3 |
ehci_raise_irq(ehci, USBSTS_FLR);
|
|
Hans de Goede |
93b7e3 |
ehci->frindex = 0;
|
|
Hans de Goede |
93b7e3 |
- if (ehci->usbsts_frindex > 0x00004000) {
|
|
Hans de Goede |
93b7e3 |
+ if (ehci->usbsts_frindex >= 0x00004000) {
|
|
Hans de Goede |
93b7e3 |
ehci->usbsts_frindex -= 0x00004000;
|
|
Hans de Goede |
93b7e3 |
} else {
|
|
Hans de Goede |
93b7e3 |
ehci->usbsts_frindex = 0;
|
|
Hans de Goede |
93b7e3 |
--
|
|
|
5544c1 |
1.7.12.1
|
|
Hans de Goede |
93b7e3 |
|