mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 02:07:34 +00:00
Kernel/Interrupts: Return boolean on whether we handled the interrupt
If we are in a shared interrupt handler, the called handlers might indicate it was not their interrupt, so we should not increment the call counter of these handlers.
This commit is contained in:
parent
7a6d5a7b8b
commit
b91df26d4a
43 changed files with 125 additions and 71 deletions
|
@ -190,7 +190,7 @@ void IDEChannel::try_disambiguate_error()
|
|||
}
|
||||
}
|
||||
|
||||
void IDEChannel::handle_irq(const RegisterState&)
|
||||
bool IDEChannel::handle_irq(const RegisterState&)
|
||||
{
|
||||
u8 status = m_io_group.io_base().offset(ATA_REG_STATUS).in<u8>();
|
||||
|
||||
|
@ -204,7 +204,7 @@ void IDEChannel::handle_irq(const RegisterState&)
|
|||
|
||||
if (!m_current_request) {
|
||||
dbgln("IDEChannel: IRQ but no pending request!");
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (status & ATA_SR_ERR) {
|
||||
|
@ -213,7 +213,7 @@ void IDEChannel::handle_irq(const RegisterState&)
|
|||
dbgln("IDEChannel: Error {:#02x}!", (u8)m_device_error);
|
||||
try_disambiguate_error();
|
||||
complete_current_request(AsyncDeviceRequest::Failure);
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
m_device_error = 0;
|
||||
|
||||
|
@ -251,6 +251,7 @@ void IDEChannel::handle_irq(const RegisterState&)
|
|||
}
|
||||
}
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
||||
static void io_delay()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue