From 7dac5c3019ee77bb40076a4ac74991fea08328e0 Mon Sep 17 00:00:00 2001 From: TomAwezome Date: Fri, 7 Oct 2022 18:55:44 -0400 Subject: [PATCH] Change ACHI HBA ports_implemented check to debug AND with bitshift. --- src/Kernel/BlkDev/DiskAHCI.ZC | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Kernel/BlkDev/DiskAHCI.ZC b/src/Kernel/BlkDev/DiskAHCI.ZC index 020715a2..e111d264 100755 --- a/src/Kernel/BlkDev/DiskAHCI.ZC +++ b/src/Kernel/BlkDev/DiskAHCI.ZC @@ -1190,7 +1190,8 @@ U0 AHCIInit() for (i = 0; i < AHCI_MAX_PORTS; i++) { - if (Bt(&hba->ports_implemented, i)) +// if (Bt(&hba->ports_implemented, i)) + if (hba->ports_implemented & (1 << i)) {//$BK,1$Make ports idle?$BK,0$ port = &hba->ports[i]; "AHCI: Port %2d signature 0x%08X ", i, port->signature; @@ -1228,7 +1229,8 @@ Bool AHCIBootDVDProbeAll(CBlkDev *bd) for (i = 0; i < AHCI_MAX_PORTS; i++) { - if (Bt(&blkdev.ahci_hba->ports_implemented, i)) +// if (Bt(&blkdev.ahci_hba->ports_implemented, i)) + if (blkdev.ahci_hba->ports_implemented & (1 << i)) { port = &blkdev.ahci_hba->ports[i]; "AHCI: BootDVDProbeAll: Saw port at %2d with signature 0x%0X\n", i, port->signature;