All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Peter Wang (王信友)" <peter.wang@mediatek.com>
To: "sashiko-reviews@lists.linux.dev" <sashiko-reviews@lists.linux.dev>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH v2 1/2] ufs: always notify POST_CHANGE even on gear switch failure
Date: Mon, 14 Sep 2026 12:42:27 +0000	[thread overview]
Message-ID: <124bc8d4adeb8da9ff611c8c745c8ca9794ea066.camel@mediatek.com> (raw)
In-Reply-To: <20260914090211.A873A1F000FF@smtp.kernel.org>

On Mon, 2026-09-14 at 09:02 +0000, sashiko-bot@kernel.org wrote
> 
> [Severity: Medium]
> Will passing NULL for dev_req_params on failure cause issues for
> unmodified
> vendor drivers?
> 
> Looking at ufs_qcom_pwr_change_notify() in drivers/ufs/host/ufs-
> qcom.c, it
> has an early check that will trap this NULL argument and log a
> spurious error
> before any POST_CHANGE cleanup can execute:
> 
> drivers/ufs/host/ufs-qcom.c:ufs_qcom_pwr_change_notify() {
> 	if (!dev_req_params) {
> 		pr_err("%s: incoming dev_req_params is NULL\n",
> __func__);
> 		return -EINVAL;
> 	}
> 	...
> }
> 
> Similarly, ufs_hisi_pwr_change_notify() in drivers/ufs/host/ufs-
> hisi.c will
> also log a spurious error on every power mode change failure:
> 
> drivers/ufs/host/ufs-hisi.c:ufs_hisi_pwr_change_notify() {
> 	if (!dev_req_params) {
> 		dev_err(hba->dev,
> 			    "%s: incoming dev_req_params is NULL\n",
> __func__);
> 		ret = -EINVAL;
> 		goto out;
> 	}
> 	...
> }
> 

Yes, both the qcom and hisi host drivers ignore NULL and only print an
error log that indicates a power‑mode‑change failure.


> Additionally, does passing NULL here destroy the context needed for
> proper
> resource rollback?
> 
> For instance, in ufs_qcom_pwr_change_notify(), resources are acquired
> in
> PRE_CHANGE based on the dev_req_params:
> 

This patch doesn't change the behavior of the qcom driver.

Thanks
Peter

  reply	other threads:[~2026-09-14 12:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-14  8:49 [PATCH v2 0/2] ufs: fix POST_CHANGE pairing and AHIT race condition peter.wang
2026-09-14  8:49 ` [PATCH v2 1/2] ufs: always notify POST_CHANGE even on gear switch failure peter.wang
2026-09-14  9:02   ` sashiko-bot
2026-09-14 12:42     ` Peter Wang (王信友) [this message]
2026-09-14  8:49 ` [PATCH v2 2/2] ufs: serialize AHIT register access between sysfs and host driver peter.wang
2026-09-14  9:13   ` sashiko-bot
2026-09-14 12:44     ` Peter Wang (王信友)
2026-09-22 10:06 ` [PATCH v2 0/2] ufs: fix POST_CHANGE pairing and AHIT race condition chun-hung.wu
2026-09-26  2:30 ` Martin K. Petersen (Oracle)
2026-10-05 15:45   ` Sandeep Dhavale
2026-10-06  2:42     ` Martin K. Petersen
2026-10-06  2:44 ` Martin K. Petersen (Oracle)

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=124bc8d4adeb8da9ff611c8c745c8ca9794ea066.camel@mediatek.com \
    --to=peter.wang@mediatek.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.