From: Damien Le Moal <dlemoal@kernel.org>
To: linux-ide@vger.kernel.org, Niklas Cassel <cassel@kernel.org>
Subject: Re: [PATCH] ata: libata-core: Do not try to set sleeping devices to standby
Date: Thu, 11 Jan 2024 20:21:24 +0900 [thread overview]
Message-ID: <8ac10be3-a3aa-4886-850a-afa51d104410@kernel.org> (raw)
In-Reply-To: <20240111111512.1255875-1-dlemoal@kernel.org>
On 1/11/24 20:15, Damien Le Moal wrote:
> 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: aa3998dbeb3a ("ata: libata-scsi: Disable scsi device manage_system_start_stop")
> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Forgot to add Cc: stable. Resending.
> ---
> drivers/ata/libata-core.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
> index 09ed67772fae..d9f80f4f70f5 100644
> --- a/drivers/ata/libata-core.c
> +++ b/drivers/ata/libata-core.c
> @@ -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
--
Damien Le Moal
Western Digital Research
prev parent reply other threads:[~2024-01-11 11:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-11 11:15 [PATCH] ata: libata-core: Do not try to set sleeping devices to standby Damien Le Moal
2024-01-11 11:21 ` Damien Le Moal [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8ac10be3-a3aa-4886-850a-afa51d104410@kernel.org \
--to=dlemoal@kernel.org \
--cc=cassel@kernel.org \
--cc=linux-ide@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox