Commit 2cae4119 authored by Gerd Hoffmann's avatar Gerd Hoffmann

xhci: move register update into xhci_intr_raise

Now that we have a separate function to raise an IRQ we can move
some comon code into the function.
Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
parent 4c47f800
......@@ -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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment