summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2003-04-11 07:43:04 +0000
committerBjörn Stenberg <bjorn@haxx.se>2003-04-11 07:43:04 +0000
commitcf92db153f5c6115466c58268bbd90e7a05ab472 (patch)
tree7bc1639fdcfddc284accb2d431f646e81b47883b /firmware
parentac3dfb81349a59b32952cb91df7a49ab8c4b0254 (diff)
Don't enter cpu sleep during disk operations
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3530 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/drivers/ata.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c
index c72ebb8790..69e40c8a7d 100644
--- a/firmware/drivers/ata.c
+++ b/firmware/drivers/ata.c
@@ -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;