mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-26 12:26:11 +00:00
ata: libata-core: Do not try to set sleeping devices to standby
commit4b085736e4
upstream. 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:aa3998dbeb
("ata: libata-scsi: Disable scsi device manage_system_start_stop") Cc: stable@vger.kernel.org Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Signed-off-by: Niklas Cassel <cassel@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
cf245e831a
commit
699e2648e1
1 changed files with 4 additions and 0 deletions
|
@ -2034,6 +2034,10 @@ void ata_dev_power_set_active(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;
|
||||
|
||||
/*
|
||||
* Issue READ VERIFY SECTORS command for 1 sector at lba=0 only
|
||||
* if supported by the device.
|
||||
|
|
Loading…
Reference in a new issue