mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-03 16:16:43 +00:00
Kernel/AHCI: Shift the call to reset() for the WorkQueue
This commit is contained in:
parent
2ae9de77bb
commit
6440beeffe
Notes:
sideshowbarker
2024-07-18 21:11:33 +09:00
Author: https://github.com/supercomputer7
Commit: 6440beeffe
Pull-request: https://github.com/SerenityOS/serenity/pull/5865
Reviewed-by: https://github.com/bgianfo
Reviewed-by: https://github.com/tomuta
1 changed files with 5 additions and 1 deletions
|
@ -102,7 +102,11 @@ void AHCIPort::handle_interrupt()
|
||||||
m_wait_connect_for_completion = true;
|
m_wait_connect_for_completion = true;
|
||||||
}
|
}
|
||||||
if (m_interrupt_status.is_set(AHCI::PortInterruptFlag::INF)) {
|
if (m_interrupt_status.is_set(AHCI::PortInterruptFlag::INF)) {
|
||||||
reset();
|
// We need to defer the reset, because we can receive interrupts when
|
||||||
|
// resetting the device.
|
||||||
|
g_io_work->queue([this]() {
|
||||||
|
reset();
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m_interrupt_status.is_set(AHCI::PortInterruptFlag::IF) || m_interrupt_status.is_set(AHCI::PortInterruptFlag::TFE) || m_interrupt_status.is_set(AHCI::PortInterruptFlag::HBD) || m_interrupt_status.is_set(AHCI::PortInterruptFlag::HBF)) {
|
if (m_interrupt_status.is_set(AHCI::PortInterruptFlag::IF) || m_interrupt_status.is_set(AHCI::PortInterruptFlag::TFE) || m_interrupt_status.is_set(AHCI::PortInterruptFlag::HBD) || m_interrupt_status.is_set(AHCI::PortInterruptFlag::HBF)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue