From: Bart Van Assche <bvanassche@acm.org>
To: HOYOUNG SEO <hy50.seo@samsung.com>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
mkp@kernel.org, martin.petersen@oracle.com,
stanleyjhu@google.com, alim.akhtar@samsung.com,
kwangwon.min@samsung.com, kwmad.kim@samsung.com,
cpgs@samsung.com, h10.kim@samsung.com
Subject: Re: [PATCH v7 2/3] scsi: ufs: core: Hold host_sem in ufshcd_wl_poweroff()
Date: Fri, 6 Nov 2026 13:56:53 -0800 [thread overview]
Message-ID: <89d22295-e6b2-46d8-a2fd-b24ed1f724d9@acm.org> (raw)
In-Reply-To: <c408e7a7167984a07dc714f43273d029b8904939.1793943246.git.hy50.seo@samsung.com>
On 11/5/26 10:11 PM, HOYOUNG SEO wrote:
> @@ -11574,6 +11574,8 @@ static int ufshcd_wl_poweroff(struct device *dev)
> struct scsi_device *sdev = to_scsi_device(dev);
> struct ufs_hba *hba = shost_priv(sdev->host);
>
> + /* Released by ufshcd_wl_resume() if hibernation is aborted. */
> + down(&hba->host_sem);
> __ufshcd_wl_suspend(hba, UFS_SHUTDOWN_PM);
> return 0;
> }
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
As Sashiko pointed out, ufshcd_wl_poweroff() is still different from
ufshcd_wl_suspend() in other ways: it ignores the return value of
__ufshcd_wl_suspend(), it doesn't check pm_runtime_suspended(dev) and
it doesn't set hba->is_sys_suspended. This patch doesn't introduce any
of these issues, so I think they should be fixed separately. Please
consider a follow-up patch that makes ufshcd_wl_suspend() and
ufshcd_wl_poweroff() share a common helper function. Since returning an
error from the .poweroff callback aborts hibernation, that change should
be a separate patch with a commit message that explains the behavior
change.
Thanks,
Bart.
next prev parent reply other threads:[~2026-11-06 21:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20261106061544epcas2p4b1ebab9e2c0e041ee52ff724caf8a9e8@epcas2p4.samsung.com>
2026-11-06 6:11 ` [PATCH v7 0/3] scsi: ufs: core: Avoid redundant link recovery from the error handler during PM HOYOUNG SEO
[not found] ` <CGME20261106061545epcas2p2e16985621e8852e675e5a557857dca54@epcas2p2.samsung.com>
2026-11-06 6:11 ` [PATCH v7 1/3] scsi: ufs: core: Clear saved errors in ufshcd_link_recovery() HOYOUNG SEO
[not found] ` <CGME20261106061546epcas2p3b0d54ffe9fcea407f7d0e27ed579de0d@epcas2p3.samsung.com>
2026-11-06 6:11 ` [PATCH v7 2/3] scsi: ufs: core: Hold host_sem in ufshcd_wl_poweroff() HOYOUNG SEO
2026-11-06 21:56 ` Bart Van Assche [this message]
[not found] ` <CGME20261106061547epcas2p40541421c139d758cdc3633302634d29b@epcas2p4.samsung.com>
2026-11-06 6:11 ` [PATCH v7 3/3] scsi: ufs: core: Limit early link recovery in the error handler to runtime PM HOYOUNG SEO
2026-11-06 21:57 ` Bart Van Assche
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=89d22295-e6b2-46d8-a2fd-b24ed1f724d9@acm.org \
--to=bvanassche@acm.org \
--cc=alim.akhtar@samsung.com \
--cc=cpgs@samsung.com \
--cc=h10.kim@samsung.com \
--cc=hy50.seo@samsung.com \
--cc=kwangwon.min@samsung.com \
--cc=kwmad.kim@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=mkp@kernel.org \
--cc=stanleyjhu@google.com \
/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
all inboxes | Powered by JetHome®