summaryrefslogtreecommitdiff
path: root/firmware/drivers/ata.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers/ata.c')
-rw-r--r--firmware/drivers/ata.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c
index 0b7a37e5ec..8f70714e4c 100644
--- a/firmware/drivers/ata.c
+++ b/firmware/drivers/ata.c
@@ -80,6 +80,7 @@ int ata_io_address; /* 0x300 or 0x200, only valid on recorder */
80static volatile unsigned char* ata_control; 80static volatile unsigned char* ata_control;
81 81
82bool old_recorder = false; 82bool old_recorder = false;
83int ata_spinup_time = 0;
83static bool sleeping = false; 84static bool sleeping = false;
84static int sleep_timeout = 5*HZ; 85static int sleep_timeout = 5*HZ;
85static bool poweroff = false; 86static bool poweroff = false;
@@ -186,6 +187,7 @@ int ata_read_sectors(unsigned long start,
186 } 187 }
187 sleeping = false; 188 sleeping = false;
188 poweroff = false; 189 poweroff = false;
190 ata_spinup_time = current_tick - last_disk_activity;
189 } 191 }
190 192
191 ATA_SELECT = ata_device; 193 ATA_SELECT = ata_device;
@@ -307,6 +309,7 @@ int ata_write_sectors(unsigned long start,
307 } 309 }
308 sleeping = false; 310 sleeping = false;
309 poweroff = false; 311 poweroff = false;
312 ata_spinup_time = current_tick - last_disk_activity;
310 } 313 }
311 314
312 ATA_SELECT = ata_device; 315 ATA_SELECT = ata_device;