mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 20:47:45 +00:00
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
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());
|
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));
|
dbgln_if(AHCI_DEBUG, "AHCI Port {}: Initialization. Signature = 0x{:08x}", representative_port_index(), static_cast<u32>(m_port_registers.sig));
|
||||||
if (!is_phy_enabled()) {
|
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());
|
dbgln_if(AHCI_DEBUG, "AHCI Port {}: Bailing initialization, Phy is not enabled.", representative_port_index());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue