summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/drivers/ata.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c
index 2116855233..39c305c3df 100644
--- a/firmware/drivers/ata.c
+++ b/firmware/drivers/ata.c
@@ -801,6 +801,11 @@ bool ata_disk_is_active(void)
void ata_sleepnow(void)
{
+ /* Don't enter sleep if the device doesn't support
+ power management. */
+ if (!(identify_info[82] & (1 << 3)))
+ return;
+
if (ata_state >= ATA_SPINUP) {
mutex_lock(&ata_mtx);
if (ata_state == ATA_ON) {