From 93548d64d798478ff954611b9cfcaf367ecbb685 Mon Sep 17 00:00:00 2001 From: aaron Date: Thu, 5 Apr 2018 13:36:04 +0000 Subject: [PATCH] git-svn-id: https://spexeah.com:8443/svn/Asuro@322 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c --- src/driver/AHCI.pas | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/driver/AHCI.pas b/src/driver/AHCI.pas index 621b3314..217c62b1 100644 --- a/src/driver/AHCI.pas +++ b/src/driver/AHCI.pas @@ -327,7 +327,7 @@ begin pport := @hba^.ports[port]; pport^.istat := $ffff; slot := find_cmd_slot(port); - if slot = -1 then exit(0); + if slot = -1 then exit(false); cmdHeader := @pport^.clb; cmdHeader += slot; @@ -363,7 +363,7 @@ begin cmdfis^.count_low := count and $FF; cmdfis^.count_high:= (count shr 8) and $FF; - while (pport^.tfd and $88) = $88 and spin < 1000000 do begin + while (pport^.tfd and $88) and spin < 1000000 do begin spin += 1; end; @@ -376,8 +376,8 @@ begin pport^.ci := 1 shl slot; while true do begin - if(pport^.ci and (1 shl slot)) = 0 then break; - if(pport^.istat and (1 shl 30)) then begin + if(pport^.ci and (1 shl slot)) = (1 shl slot) then break; + if(pport^.istat and (1 shl 30)) = (1 shl 30) then begin console.writestringln('AHCI controller: Disk read error!'); read:= false; exit;