forked from len0rd/rockbox
Don't enter cpu sleep during disk operations
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3530 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
ac3dfb8134
commit
cf92db153f
1 changed files with 3 additions and 6 deletions
|
|
@ -112,8 +112,7 @@ static int wait_for_bsy(void)
|
|||
int timeout = current_tick + HZ*10;
|
||||
last_disk_activity = timeout;
|
||||
while (TIME_BEFORE(current_tick, timeout) && (ATA_ALT_STATUS & STATUS_BSY))
|
||||
sleep_thread();
|
||||
wake_up_thread();
|
||||
yield();
|
||||
|
||||
if (TIME_BEFORE(current_tick, timeout))
|
||||
return 1;
|
||||
|
|
@ -132,10 +131,8 @@ static int wait_for_rdy(void)
|
|||
timeout = current_tick + HZ*10;
|
||||
last_disk_activity = timeout;
|
||||
|
||||
while (TIME_BEFORE(current_tick, timeout) &&
|
||||
!(ATA_ALT_STATUS & STATUS_RDY))
|
||||
sleep_thread();
|
||||
wake_up_thread();
|
||||
while (TIME_BEFORE(current_tick, timeout) && !(ATA_ALT_STATUS & STATUS_RDY))
|
||||
yield();
|
||||
|
||||
if (TIME_BEFORE(current_tick, timeout))
|
||||
return STATUS_RDY;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue