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