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