Kernel: Cleanup and fix xHCI interrupt handling
Always clear EventHandlerBusy bit and remove unnecessary nesting
This commit is contained in:
parent
c1d8790623
commit
480368c878
|
@ -463,16 +463,14 @@ namespace Kernel
|
|||
|
||||
void XHCIController::handle_irq()
|
||||
{
|
||||
auto& primary_interrupter = runtime_regs().irs[0];
|
||||
primary_interrupter.iman = primary_interrupter.iman | XHCI::IMAN::InterruptPending | XHCI::IMAN::InterruptEnable;
|
||||
|
||||
auto& operational = operational_regs();
|
||||
if (!(operational.usbsts & XHCI::USBSTS::EventInterrupt))
|
||||
return;
|
||||
operational.usbsts = XHCI::USBSTS::EventInterrupt;
|
||||
|
||||
auto& primary_interrupter = runtime_regs().irs[0];
|
||||
primary_interrupter.iman = primary_interrupter.iman | XHCI::IMAN::InterruptPending | XHCI::IMAN::InterruptEnable;
|
||||
|
||||
if (current_event_trb().cycle == m_event_cycle)
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
auto& trb = current_event_trb();
|
||||
|
@ -555,7 +553,6 @@ namespace Kernel
|
|||
|
||||
primary_interrupter.erdp = (m_event_ring_region->paddr() + (m_event_dequeue * sizeof(XHCI::TRB))) | XHCI::ERDP::EventHandlerBusy;
|
||||
}
|
||||
}
|
||||
|
||||
volatile XHCI::CapabilityRegs& XHCIController::capability_regs()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue