From 11310e761579007eef31a6564610ab42e18d5a8f Mon Sep 17 00:00:00 2001 From: Bananymous Date: Mon, 10 Feb 2025 22:58:14 +0200 Subject: [PATCH] Kernel: Don't manually clear xHCI interrupt flag if using MSI --- kernel/kernel/USB/XHCI/Controller.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/kernel/USB/XHCI/Controller.cpp b/kernel/kernel/USB/XHCI/Controller.cpp index 9000d338..cea3c61e 100644 --- a/kernel/kernel/USB/XHCI/Controller.cpp +++ b/kernel/kernel/USB/XHCI/Controller.cpp @@ -536,7 +536,8 @@ 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; + if (m_pci_device.interrupt_mechanism() != PCI::Device::InterruptMechanism::MSI && m_pci_device.interrupt_mechanism() != PCI::Device::InterruptMechanism::MSIX) + primary_interrupter.iman = primary_interrupter.iman | XHCI::IMAN::InterruptPending | XHCI::IMAN::InterruptEnable; auto& operational = operational_regs(); if (!(operational.usbsts & XHCI::USBSTS::EventInterrupt))