Files
OpenSuperClone/res/oscscripts/ata_enable_look_ahead.osc
T

43 lines
836 B
Plaintext

seti $printhelp = $printhelp
seti $help = $help
if $help = 1
echo 'Enable read look ahead.'
echo 'Example: opensuperclone --tool -t /dev/sda -f ata_enable_look_ahead.osc'
if $printhelp = 1
exit 0
endif
echo 'Hit ENTER to continue...'
userinput $choicestring
previousscript
endif
include good_subroutines.osc
buffersize 0
setreadpio
# set the LBAs and count to 0
seti $count = 0
seti $LBAlow = 0
seti $LBAmid = 0
seti $LBAhigh = 0
# set features to enable read look ahead
seti $features = 0xaa
# set device bits 7(compatibility) 5(compatibility)
seti $device = 0xa0
# set the command for set features non-data
seti $command = 0xef
# perform the command
ata28cmd $features $count $LBAlow $LBAmid $LBAhigh $device $command
# check if command failed
gosub status_check
echo "Command completed"
previousscript
end