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:
parent
4b423e21f6
commit
2905ba2f72
1 changed files with 4 additions and 1 deletions
|
@ -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);
|
||||||
ata_power_down();
|
|
||||||
|
if (ata_disk_can_poweroff())
|
||||||
|
ata_power_down();
|
||||||
|
|
||||||
mutex_unlock(&ata_mutex);
|
mutex_unlock(&ata_mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue