diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/drivers/ata.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c index 1bf5b5cf04..a96705f981 100644 --- a/firmware/drivers/ata.c +++ b/firmware/drivers/ata.c | |||
@@ -606,7 +606,11 @@ int ata_standby(int time) | |||
606 | return -1; | 606 | return -1; |
607 | } | 607 | } |
608 | 608 | ||
609 | ATA_NSECTOR = ((time + 5) / 5) & 0xff; /* Round up to nearest 5 secs */ | 609 | if(time) |
610 | ATA_NSECTOR = ((time + 5) / 5) & 0xff; /* Round up to nearest 5 secs */ | ||
611 | else | ||
612 | ATA_NSECTOR = 0; /* Disable standby */ | ||
613 | |||
610 | ATA_COMMAND = CMD_STANDBY; | 614 | ATA_COMMAND = CMD_STANDBY; |
611 | 615 | ||
612 | if (!wait_for_rdy()) | 616 | if (!wait_for_rdy()) |
@@ -873,6 +877,8 @@ static int set_features(void) | |||
873 | }; | 877 | }; |
874 | int i; | 878 | int i; |
875 | 879 | ||
880 | return 0; | ||
881 | |||
876 | ATA_SELECT = ata_device; | 882 | ATA_SELECT = ata_device; |
877 | 883 | ||
878 | if (!wait_for_rdy()) { | 884 | if (!wait_for_rdy()) { |
@@ -969,6 +975,8 @@ int ata_init(void) | |||
969 | if (rc) | 975 | if (rc) |
970 | return -60 + rc; | 976 | return -60 + rc; |
971 | 977 | ||
978 | ata_standby(0); | ||
979 | |||
972 | queue_init(&ata_queue); | 980 | queue_init(&ata_queue); |
973 | 981 | ||
974 | last_disk_activity = current_tick; | 982 | last_disk_activity = current_tick; |