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:
parent
770a729e59
commit
ff4afe17be
Notes:
sideshowbarker
2024-07-19 00:00:47 +09:00
Author: https://github.com/Quaker762 Commit: https://github.com/SerenityOS/serenity/commit/ff4afe17bee Pull-request: https://github.com/SerenityOS/serenity/pull/4019 Reviewed-by: https://github.com/Lubrsi Reviewed-by: https://github.com/awesomekling
1 changed files with 4 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue