1
0
Fork 0
forked from len0rd/rockbox

An attempt to get rid of the "red freeze" problem: Perform a soft reset on read error.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3351 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Björn Stenberg 2003-02-27 13:26:09 +00:00
parent 648ccc8f0f
commit 6a58106e97

View file

@ -191,6 +191,9 @@ int ata_read_sectors(unsigned long start,
}
}
timeout = current_tick + READ_TIMEOUT;
retry:
ATA_SELECT = ata_device;
if (!wait_for_rdy())
{
@ -198,9 +201,6 @@ int ata_read_sectors(unsigned long start,
return -2;
}
timeout = current_tick + READ_TIMEOUT;
retry:
buf = inbuf;
count = incount;
while (TIME_BEFORE(current_tick, timeout)) {
@ -228,6 +228,8 @@ int ata_read_sectors(unsigned long start,
if ( ATA_ALT_STATUS & (STATUS_ERR | STATUS_DF) ) {
ret = -5;
if (perform_soft_reset())
break;
goto retry;
}