kernel/ATA: Do not discard the controller if at least one channel initialized properly

This was causing problems in VirtualBox.
This commit is contained in:
apio 2023-07-10 13:01:24 +02:00
parent ae0cd155c3
commit 7908c5a63e
Signed by: asleepymoon
GPG Key ID: B8A7D06E42258954

View File

@ -65,9 +65,12 @@ namespace ATA
if (command_new != command_old) PCI::write16(m_device.address, PCI::Command, command_new);
if (!m_primary_channel.initialize()) return false;
bool success = false;
return m_secondary_channel.initialize();
if (m_primary_channel.initialize()) success = true;
if (m_secondary_channel.initialize()) success = true;
return success;
}
void Controller::irq_handler(Registers* regs)