duskos

dusk os fork
git clone git://git.alexwennerberg.com/duskos
Log | Files | Refs | README | LICENSE

commit 902cc0ed86bcc2b369ea9ecd092ac0dc32a2c705
parent 1dab3f145bd77d89c757ba4fbbb6b5db02b663f5
Author: Virgil Dupras <hsoft@hardcoded.net>
Date:   Sun,  6 Nov 2022 14:30:27 -0500

drv/pc/ata: fix timing issue

On real hardware, a wait is necessary at the beginning of _locate or else we
might be sending that command when the drive isn't ready.

Diffstat:
Mfs/drv/pc/ata.fs | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/drv/pc/ata.fs b/fs/drv/pc/ata.fs @@ -38,7 +38,7 @@ extends Drive struct[ ATADrive : _locate ( sec drv -- ) >r dup 24 rshift $f and $e0 or r@ unit bool 4 lshift or - r@ _drvhd pc! + r@ _wait r@ _drvhd pc! 0 r@ _features pc! 1 r@ _seccnt pc! dup $ff and r@ _secno pc!