summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2004-02-16 23:25:01 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2004-02-16 23:25:01 +0000
commitc3b9720ab4ee274fc3f4cfb99d91387d43b1393a (patch)
tree12032697740ea679b85415c4e6f80ce33a03b58b
parentae6e33e921f3b6aa7ddc21d5b07d4eb2301389b6 (diff)
downloadrockbox-c3b9720ab4ee274fc3f4cfb99d91387d43b1393a.zip
rockbox-c3b9720ab4ee274fc3f4cfb99d91387d43b1393a.tar.gz
rockbox-c3b9720ab4ee274fc3f4cfb99d91387d43b1393a.tar.bz2
rockbox-c3b9720ab4ee274fc3f4cfb99d91387d43b1393a.tar.xz
Bug 1: The STANDBY mode is now explicitly disabled, since it could be set to 30s at powerup. Bug 2: set_features() wasn't called in ata_power_on().
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4307 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/drivers/ata.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c
index 1bf5b5c..a96705f 100644
--- a/firmware/drivers/ata.c
+++ b/firmware/drivers/ata.c
@@ -606,7 +606,11 @@ int ata_standby(int time)
return -1;
}
- ATA_NSECTOR = ((time + 5) / 5) & 0xff; /* Round up to nearest 5 secs */
+ if(time)
+ ATA_NSECTOR = ((time + 5) / 5) & 0xff; /* Round up to nearest 5 secs */
+ else
+ ATA_NSECTOR = 0; /* Disable standby */
+
ATA_COMMAND = CMD_STANDBY;
if (!wait_for_rdy())
@@ -873,6 +877,8 @@ static int set_features(void)
};
int i;
+ return 0;
+
ATA_SELECT = ata_device;
if (!wait_for_rdy()) {
@@ -969,6 +975,8 @@ int ata_init(void)
if (rc)
return -60 + rc;
+ ata_standby(0);
+
queue_init(&ata_queue);
last_disk_activity = current_tick;