summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/drivers/ata.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c
index baef6691d4..0d82efb07f 100644
--- a/firmware/drivers/ata.c
+++ b/firmware/drivers/ata.c
@@ -861,7 +861,9 @@ void ata_spin(void)
861 861
862static void ata_thread(void) 862static void ata_thread(void)
863{ 863{
864#ifdef HAVE_ATA_POWER_OFF
864 static long last_sleep = 0; 865 static long last_sleep = 0;
866#endif
865 struct queue_event ev; 867 struct queue_event ev;
866#ifdef ALLOW_USB_SPINDOWN 868#ifdef ALLOW_USB_SPINDOWN
867 static bool usb_mode = false; 869 static bool usb_mode = false;
@@ -899,7 +901,9 @@ static void ata_thread(void)
899 } 901 }
900 mutex_lock(&ata_mtx); 902 mutex_lock(&ata_mtx);
901 ata_perform_sleep(); 903 ata_perform_sleep();
904#ifdef HAVE_ATA_POWER_OFF
902 last_sleep = current_tick; 905 last_sleep = current_tick;
906#endif
903 mutex_unlock(&ata_mtx); 907 mutex_unlock(&ata_mtx);
904 } 908 }
905 } 909 }