diff options
Diffstat (limited to 'firmware/drivers/ata.c')
-rw-r--r-- | firmware/drivers/ata.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c index 56dc7d74fe..7d306084e4 100644 --- a/firmware/drivers/ata.c +++ b/firmware/drivers/ata.c | |||
@@ -809,16 +809,17 @@ void ata_spindown(int seconds) | |||
809 | 809 | ||
810 | bool ata_disk_is_active(void) | 810 | bool ata_disk_is_active(void) |
811 | { | 811 | { |
812 | /* "active" here means "spinning and needs to be shut down" */ | 812 | /* "active" here means "spinning / not sleeping" |
813 | 813 | we normally leave active state by putting the device to | |
814 | /* SSDs are considered always "inactive" */ | 814 | sleep (using ATA powersave commands) which flushes all writes |
815 | if (ata_disk_isssd()) | 815 | and puts the device into an inactive/quiescent state. |
816 | return false; | 816 | |
817 | 817 | Unfortuantely the CF->SD chipset used by the common iFlash | |
818 | /* We can't directly detect the common iFlash adapters, but they | 818 | adapters does not support ATA powersave, which makes the |
819 | don't claim to support powermanagement. Without ATA power | 819 | "active/not" distinction irrelevant, so insead we just mirror |
820 | management we can never spin down anyway, so there's | 820 | the sd/mmc/flash storage drivers and claim that we're always |
821 | no point in even trying. */ | 821 | inactive. |
822 | */ | ||
822 | if (!(identify_info[82] & (1 << 3))) | 823 | if (!(identify_info[82] & (1 << 3))) |
823 | return false; | 824 | return false; |
824 | 825 | ||
@@ -828,7 +829,7 @@ bool ata_disk_is_active(void) | |||
828 | void ata_sleepnow(void) | 829 | void ata_sleepnow(void) |
829 | { | 830 | { |
830 | /* Don't enter sleep if the device doesn't support | 831 | /* Don't enter sleep if the device doesn't support |
831 | power management. */ | 832 | power management. See comment in ata_disk_is_active() */ |
832 | if (!(identify_info[82] & (1 << 3))) | 833 | if (!(identify_info[82] & (1 << 3))) |
833 | return; | 834 | return; |
834 | 835 | ||