Kernel/Storage: Enable interrupts for AHCI ports if PHY is not enabled
This change allows the controller to utilize interrupts even if no device was connected to a port when we initialize it, so we can support hotplug events now.
This commit is contained in:
parent
d431e4cd01
commit
907b3dd0f3
Notes:
sideshowbarker
2024-07-18 17:13:34 +09:00
Author: https://github.com/supercomputer7 Commit: https://github.com/SerenityOS/serenity/commit/907b3dd0f38 Pull-request: https://github.com/SerenityOS/serenity/pull/7539
1 changed files with 4 additions and 0 deletions
|
@ -241,6 +241,10 @@ bool AHCIPort::initialize(ScopedSpinLock<SpinLock<u8>>& main_lock)
|
|||
VERIFY(m_lock.is_locked());
|
||||
dbgln_if(AHCI_DEBUG, "AHCI Port {}: Initialization. Signature = 0x{:08x}", representative_port_index(), static_cast<u32>(m_port_registers.sig));
|
||||
if (!is_phy_enabled()) {
|
||||
// Note: If PHY is not enabled, just clear the interrupt status and enable interrupts, in case
|
||||
// we are going to hotplug a device later.
|
||||
m_interrupt_status.clear();
|
||||
m_interrupt_enable.set_all();
|
||||
dbgln_if(AHCI_DEBUG, "AHCI Port {}: Bailing initialization, Phy is not enabled.", representative_port_index());
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue