summaryrefslogtreecommitdiffstats
path: root/firmware/powermgmt.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/powermgmt.c')
-rw-r--r--firmware/powermgmt.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c
index c7c299092c..61006459ff 100644
--- a/firmware/powermgmt.c
+++ b/firmware/powermgmt.c
@@ -339,6 +339,10 @@ static void handle_auto_poweroff(void)
else
{
DEBUGF("Sleep timer timeout. Shutting off...\n");
+ /* Make sure that the disk isn't spinning when
+ we cut the power */
+ while(ata_disk_is_active())
+ sleep(HZ);
power_off();
}
}