1
0
Fork 0
forked from len0rd/rockbox

ipod6g: ata: Don't power down devices that can't handle it

...by checking to see if the mandatory ATA PM feature flag is set

The common CF->SD adapters don't report this.

TODO:  When PM is not available, issue a CMD_FLUSH[_EXT] instead?

Change-Id: If9200bd3c03a984376203aeea4fbe11e230a9b4d
This commit is contained in:
Solomon Peachy 2024-04-15 16:27:32 -04:00
parent 4b423e21f6
commit 2905ba2f72

View file

@ -984,7 +984,10 @@ void ata_spindown(int seconds)
void ata_sleepnow(void) void ata_sleepnow(void)
{ {
mutex_lock(&ata_mutex); mutex_lock(&ata_mutex);
if (ata_disk_can_poweroff())
ata_power_down(); ata_power_down();
mutex_unlock(&ata_mutex); mutex_unlock(&ata_mutex);
} }