From: Damien Le Moal <dlemoal@kernel.org>
To: Sergey Shtylyov <s.shtylyov@omp.ru>,
"Martin K . Petersen" <martin.petersen@oracle.com>,
James Bottomley <James.Bottomley@HansenPartnership.com>,
linux-scsi@vger.kernel.org, linux-ide@vger.kernel.org
Cc: Bart Van Assche <bvanassche@acm.org>, Phillip Susi <phill@thesusis.net>
Subject: Re: [PATCH 2/2] scsi: sd: fix system start for ATA devices
Date: Mon, 20 Nov 2023 18:00:08 +0900 [thread overview]
Message-ID: <27500ebc-1ba5-4171-b93a-227f1391d63e@kernel.org> (raw)
In-Reply-To: <a3008d49-32db-51cc-f9aa-ca9ec91ec14d@omp.ru>
On 11/20/23 17:50, Sergey Shtylyov wrote:
> On 11/20/23 10:35 AM, Damien Le Moal wrote:
>
>> Ti is not always possible to keep a device in the runtime suspended
>
> s/Ti/It? :-)
Arg. Yes.
>
>> state when a system level suspend/resume cycle is executed. E.g. for ATA
>> devices connected to AHCI adapters, system resume resets the ATA ports,
>> which causes connected devices to spin up. In such case, a runtime
>> suspended disk will incorrectly be seen with a suspended runtime state
>> because the device is not resumed by sd_resume_system(). The power state
>> seen by the user is different than the actual device physical power
>> state.
>>
>> Fix this issue by introducing the struct scsi_device flag
>> force_runtime_start_on_system_start. When set, this flag causes
>> sd_resume_system() to request a runtime resume operation for runtime
>> suspended devices. This results in the user seeing the device
>> runtime_state as active after a system resume, thus correctly reflecting
>> the device physical power state.
>>
>> Fixes: 9131bff6a9f1 ("scsi: core: pm: Only runtime resume if necessary")
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
> [...]
>
> MBR, Sergey
--
Damien Le Moal
Western Digital Research
next prev parent reply other threads:[~2023-11-20 9:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-20 7:35 [PATCH 0/2] Fix runtime suspended device resume Damien Le Moal
2023-11-20 7:35 ` [PATCH 1/2] scsi: Change scsi device boolean fields to single bit flags Damien Le Moal
2023-11-20 16:06 ` Bart Van Assche
2023-11-20 22:53 ` Damien Le Moal
2023-11-20 7:35 ` [PATCH 2/2] scsi: sd: fix system start for ATA devices Damien Le Moal
2023-11-20 8:50 ` Sergey Shtylyov
2023-11-20 9:00 ` Damien Le Moal [this message]
2023-11-20 12:41 ` Niklas Cassel
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=27500ebc-1ba5-4171-b93a-227f1391d63e@kernel.org \
--to=dlemoal@kernel.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=bvanassche@acm.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=phill@thesusis.net \
--cc=s.shtylyov@omp.ru \
/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