mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-09-01 22:42:13 -06:00
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: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
4c47f80063
commit
2cae41195b
1 changed files with 5 additions and 9 deletions
|
@ -662,8 +662,11 @@ static void xhci_msix_update(XHCIState *xhci)
|
||||||
|
|
||||||
static void xhci_intr_raise(XHCIState *xhci)
|
static void xhci_intr_raise(XHCIState *xhci)
|
||||||
{
|
{
|
||||||
if (!(xhci->iman & IMAN_IP) ||
|
xhci->erdp_low |= ERDP_EHB;
|
||||||
!(xhci->iman & IMAN_IE)) {
|
xhci->iman |= IMAN_IP;
|
||||||
|
xhci->usbsts |= USBSTS_EINT;
|
||||||
|
|
||||||
|
if (!(xhci->iman & IMAN_IE)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -784,9 +787,6 @@ static void xhci_events_update(XHCIState *xhci)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (do_irq) {
|
if (do_irq) {
|
||||||
xhci->erdp_low |= ERDP_EHB;
|
|
||||||
xhci->iman |= IMAN_IP;
|
|
||||||
xhci->usbsts |= USBSTS_EINT;
|
|
||||||
xhci_intr_raise(xhci);
|
xhci_intr_raise(xhci);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -847,10 +847,6 @@ static void xhci_event(XHCIState *xhci, XHCIEvent *event)
|
||||||
xhci_write_event(xhci, event);
|
xhci_write_event(xhci, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
xhci->erdp_low |= ERDP_EHB;
|
|
||||||
xhci->iman |= IMAN_IP;
|
|
||||||
xhci->usbsts |= USBSTS_EINT;
|
|
||||||
|
|
||||||
xhci_intr_raise(xhci);
|
xhci_intr_raise(xhci);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue