|
|
5544c1 |
From be996e1a852397f4009d08ac803081e1dfbc7326 Mon Sep 17 00:00:00 2001
|
|
Hans de Goede |
c8dfc6 |
From: Gerd Hoffmann <kraxel@redhat.com>
|
|
Hans de Goede |
c8dfc6 |
Date: Thu, 30 Aug 2012 14:04:04 +0200
|
|
|
5544c1 |
Subject: [PATCH] xhci: move register update into xhci_intr_raise
|
|
Hans de Goede |
c8dfc6 |
|
|
Hans de Goede |
c8dfc6 |
Now that we have a separate function to raise an IRQ we can move
|
|
Hans de Goede |
c8dfc6 |
some comon code into the function.
|
|
Hans de Goede |
c8dfc6 |
|
|
Hans de Goede |
c8dfc6 |
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
Hans de Goede |
c8dfc6 |
---
|
|
Hans de Goede |
c8dfc6 |
hw/usb/hcd-xhci.c | 14 +++++---------
|
|
Hans de Goede |
c8dfc6 |
1 file changed, 5 insertions(+), 9 deletions(-)
|
|
Hans de Goede |
c8dfc6 |
|
|
Hans de Goede |
c8dfc6 |
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
|
|
|
5544c1 |
index 777f903..32d22f7 100644
|
|
Hans de Goede |
c8dfc6 |
--- a/hw/usb/hcd-xhci.c
|
|
Hans de Goede |
c8dfc6 |
+++ b/hw/usb/hcd-xhci.c
|
|
Hans de Goede |
c8dfc6 |
@@ -662,8 +662,11 @@ static void xhci_msix_update(XHCIState *xhci)
|
|
Hans de Goede |
c8dfc6 |
|
|
Hans de Goede |
c8dfc6 |
static void xhci_intr_raise(XHCIState *xhci)
|
|
Hans de Goede |
c8dfc6 |
{
|
|
Hans de Goede |
c8dfc6 |
- if (!(xhci->iman & IMAN_IP) ||
|
|
Hans de Goede |
c8dfc6 |
- !(xhci->iman & IMAN_IE)) {
|
|
Hans de Goede |
c8dfc6 |
+ xhci->erdp_low |= ERDP_EHB;
|
|
Hans de Goede |
c8dfc6 |
+ xhci->iman |= IMAN_IP;
|
|
Hans de Goede |
c8dfc6 |
+ xhci->usbsts |= USBSTS_EINT;
|
|
Hans de Goede |
c8dfc6 |
+
|
|
Hans de Goede |
c8dfc6 |
+ if (!(xhci->iman & IMAN_IE)) {
|
|
Hans de Goede |
c8dfc6 |
return;
|
|
Hans de Goede |
c8dfc6 |
}
|
|
Hans de Goede |
c8dfc6 |
|
|
Hans de Goede |
c8dfc6 |
@@ -784,9 +787,6 @@ static void xhci_events_update(XHCIState *xhci)
|
|
Hans de Goede |
c8dfc6 |
}
|
|
Hans de Goede |
c8dfc6 |
|
|
Hans de Goede |
c8dfc6 |
if (do_irq) {
|
|
Hans de Goede |
c8dfc6 |
- xhci->erdp_low |= ERDP_EHB;
|
|
Hans de Goede |
c8dfc6 |
- xhci->iman |= IMAN_IP;
|
|
Hans de Goede |
c8dfc6 |
- xhci->usbsts |= USBSTS_EINT;
|
|
Hans de Goede |
c8dfc6 |
xhci_intr_raise(xhci);
|
|
Hans de Goede |
c8dfc6 |
}
|
|
Hans de Goede |
c8dfc6 |
|
|
Hans de Goede |
c8dfc6 |
@@ -847,10 +847,6 @@ static void xhci_event(XHCIState *xhci, XHCIEvent *event)
|
|
Hans de Goede |
c8dfc6 |
xhci_write_event(xhci, event);
|
|
Hans de Goede |
c8dfc6 |
}
|
|
Hans de Goede |
c8dfc6 |
|
|
Hans de Goede |
c8dfc6 |
- xhci->erdp_low |= ERDP_EHB;
|
|
Hans de Goede |
c8dfc6 |
- xhci->iman |= IMAN_IP;
|
|
Hans de Goede |
c8dfc6 |
- xhci->usbsts |= USBSTS_EINT;
|
|
Hans de Goede |
c8dfc6 |
-
|
|
Hans de Goede |
c8dfc6 |
xhci_intr_raise(xhci);
|
|
Hans de Goede |
c8dfc6 |
}
|
|
Hans de Goede |
c8dfc6 |
|
|
Hans de Goede |
c8dfc6 |
--
|
|
|
5544c1 |
1.7.12.1
|
|
Hans de Goede |
c8dfc6 |
|