Skip to content

Commit 4b08573

Browse files
damien-lemoalfloatious
authored andcommitted
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: aa3998d ("ata: libata-scsi: Disable scsi device manage_system_start_stop") Cc: [email protected] Signed-off-by: Damien Le Moal <[email protected]> Signed-off-by: Niklas Cassel <[email protected]>
1 parent 51af8f2 commit 4b08573

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/ata/libata-core.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2017,6 +2017,10 @@ void ata_dev_power_set_standby(struct ata_device *dev)
20172017
struct ata_taskfile tf;
20182018
unsigned int err_mask;
20192019

2020+
/* If the device is already sleeping, do nothing. */
2021+
if (dev->flags & ATA_DFLAG_SLEEPING)
2022+
return;
2023+
20202024
/*
20212025
* Some odd clown BIOSes issue spindown on power off (ACPI S4 or S5)
20222026
* causing some drives to spin up and down again. For these, do nothing

0 commit comments

Comments
 (0)