Commit 4b085736 authored by Damien Le Moal's avatar Damien Le Moal Committed by Niklas Cassel

ata: libata-core: Do not try to set sleeping devices to standby

In ata ata_dev_power_set_standby(), check that the target device is not
sleeping. If it is, there is no need to do anything.

Fixes: aa3998db ("ata: libata-scsi: Disable scsi device manage_system_start_stop")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarDamien Le Moal <dlemoal@kernel.org>
Signed-off-by: default avatarNiklas Cassel <cassel@kernel.org>
parent 51af8f25
......@@ -2017,6 +2017,10 @@ void ata_dev_power_set_standby(struct ata_device *dev)
struct ata_taskfile tf;
unsigned int err_mask;
/* If the device is already sleeping, do nothing. */
if (dev->flags & ATA_DFLAG_SLEEPING)
return;
/*
* Some odd clown BIOSes issue spindown on power off (ACPI S4 or S5)
* causing some drives to spin up and down again. For these, do nothing
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment