summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/ata_idle_notify.c7
-rw-r--r--firmware/drivers/ata.c2
2 files changed, 6 insertions, 3 deletions
diff --git a/firmware/ata_idle_notify.c b/firmware/ata_idle_notify.c
index 17adbc1192..1fc6605ac6 100644
--- a/firmware/ata_idle_notify.c
+++ b/firmware/ata_idle_notify.c
@@ -77,8 +77,11 @@ bool call_ata_idle_notifys(bool force)
77 int i; 77 int i;
78 static int lock_until = 0; 78 static int lock_until = 0;
79 ata_idle_notify function; 79 ata_idle_notify function;
80 if (!force && TIME_BEFORE(current_tick,lock_until) ) 80 if (!force)
81 return false; 81 {
82 if (TIME_BEFORE(current_tick,lock_until) )
83 return false;
84 }
82 lock_until = current_tick + 30*HZ; 85 lock_until = current_tick + 30*HZ;
83 86
84 for (i = 0; i < MAX_ATA_CALLBACKS; i++) 87 for (i = 0; i < MAX_ATA_CALLBACKS; i++)
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c
index 72194db8da..5e69b36f2d 100644
--- a/firmware/drivers/ata.c
+++ b/firmware/drivers/ata.c
@@ -614,7 +614,7 @@ static void ata_thread(void)
614 TIME_AFTER( current_tick, 614 TIME_AFTER( current_tick,
615 last_disk_activity + sleep_timeout ) ) 615 last_disk_activity + sleep_timeout ) )
616 { 616 {
617 call_ata_idle_notifys(false); 617 call_ata_idle_notifys(true);
618 ata_perform_sleep(); 618 ata_perform_sleep();
619 last_sleep = current_tick; 619 last_sleep = current_tick;
620 } 620 }