The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Kuldeep Singh <kuldeep.singh@oss.qualcomm.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>,
	Ulf Hansson <ulfh@kernel.org>, Abel Vesa <abelvesa@kernel.org>,
	Manivannan Sadhasivam <mani@kernel.org>,
	"James E.J. Bottomley" <James.Bottomley@hansenpartnership.com>,
	"Martin K. Petersen" <mkp@kernel.org>,
	linux-mmc@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH v2 2/2] ufs: ufs-qcom: Enable ICE before enabling crypto support
Date: Thu, 12 Nov 2026 20:08:20 -0800	[thread overview]
Message-ID: <20261113040820.GE1742@sol> (raw)
In-Reply-To: <20261112-qcom_ice_pm_enable-v2-2-177e454d6f22@oss.qualcomm.com>

On Thu, Nov 12, 2026 at 06:48:18PM +0530, Kuldeep Singh wrote:
> ufs-qcom currently exposes UFS crypto profile and sets UFSHCD_CAP_CRYPTO
> before enabling ICE. This leaves a window where blk-crypto can issue
> keyslot programming calls before ufs-qcom has explicitly enabled ICE.

Please be more specific about what actually goes wrong, and why.  During
probe, the crypto profile hasn't actually been registered with the block
layer yet.  So the above seems inaccurate.  Likewise in the MMC patch.

>  static int ufs_qcom_ice_init(struct ufs_qcom_host *host)
>  {
> @@ -188,6 +190,12 @@ static int ufs_qcom_ice_init(struct ufs_qcom_host *host)
>  
>  	host->ice = ice;
>  
> +	err = qcom_ice_enable(host->ice);

Use the 'ice' local variable.

> @@ -636,12 +645,15 @@ static int ufs_qcom_hce_enable_notify(struct ufs_hba *hba,
>  		 * is initialized.
>  		 */
>  		err = ufs_qcom_enable_lane_clks(host);
> +		if (err)
> +			return err;
> +
> +		err = ufs_qcom_ice_enable(host);
>  		break;
>  	case POST_CHANGE:
>  		/* check if UFS PHY moved from DISABLED to HIBERN8 */
>  		err = ufs_qcom_check_hibern8(hba);
>  		ufs_qcom_enable_hw_clk_gating(hba);
> -		ufs_qcom_ice_enable(host);
>  		ufs_qcom_config_ice_allocator(host);
>  		break;

Needs an explanation for why ufs_qcom_config_ice_allocator() and
ufs_qcom_ice_enable() need to be called at different times.

- Eric

      reply	other threads:[~2026-11-13  4:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-12 13:18 [PATCH v2 0/2] Fix MMC/UFS sequence for ICE calls Kuldeep Singh
2026-11-12 13:18 ` [PATCH v2 1/2] mmc: sdhci-msm: Enable ICE before enabling crypto support Kuldeep Singh
2026-11-12 13:18 ` [PATCH v2 2/2] ufs: ufs-qcom: " Kuldeep Singh
2026-11-13  4:08   ` Eric Biggers [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=20261113040820.GE1742@sol \
    --to=ebiggers@kernel.org \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=abelvesa@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=kuldeep.singh@oss.qualcomm.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mani@kernel.org \
    --cc=mkp@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=ulfh@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