kernel: Detect some other cases of non-DMA support
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
apio 2023-08-08 18:23:13 +02:00
parent 16590dbb02
commit ed8b210639
Signed by: apio
GPG Key ID: B8A7D06E42258954

View File

@ -431,6 +431,18 @@ namespace ATA
m_uses_dma = false;
}
if (m_drive_index == 0 && !(status & BMS_MasterInit))
{
kwarnln("ata: Drive %d does not have DMA support", m_drive_index);
m_uses_dma = false;
}
if (m_drive_index == 1 && !(status & BMS_SlaveInit))
{
kwarnln("ata: Drive %d does not have DMA support", m_drive_index);
m_uses_dma = false;
}
auto frame = MemoryManager::alloc_frame();
if (frame.has_error() || frame.value() > 0xffffffff)
{