Kernel/USB: Ignore shared IRQs

According the USB spec/UHCI datasheet (as well as the Linux and
BSD source code), if we receive an IRQ and USBSTS is 0, then
the IRQ does not belong to us and we should immediately jump
out of the handler.
This commit is contained in:
Jesse Buhagiar 2021-01-03 16:01:52 +11:00 committed by Andreas Kling
parent 770a729e59
commit ff4afe17be
Notes: sideshowbarker 2024-07-19 00:00:47 +09:00

View file

@ -395,6 +395,10 @@ void UHCIController::spawn_port_proc()
void UHCIController::handle_irq(const RegisterState&)
{
// Shared IRQ. Not ours!
if(!read_usbsts())
return;
klog() << "UHCI: Interrupt happened!";
klog() << "Value of USBSTS: " << read_usbsts();
}