Implement ICE (Inline Crypto Engine) clock scaling in sync with
UFS controller clock scaling. This ensures that the ICE operates at
an appropriate frequency when the UFS clocks are scaled up or down,
improving performance and maintaining stability for crypto operations.
Incase of OPP scaling is not supported by ICE, ensure to not prevent
devfreq for UFS, as ICE OPP-table is optional.
Acked-by: Manivannan Sadhasivam <mani@kernel.org>
Signed-off-by: Abhinaba Rakshit <abhinaba.rakshit@oss.qualcomm.com>
---
drivers/ufs/host/ufs-qcom.c | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c
index 8d119b3223cbdaa3297d2beabced0962a1a847d5..d85640028b567d2084683f237e3110c682a08ddb 100644
--- a/drivers/ufs/host/ufs-qcom.c
+++ b/drivers/ufs/host/ufs-qcom.c
@@ -305,6 +305,15 @@ static int ufs_qcom_ice_prepare_key(struct blk_crypto_profile *profile,
return qcom_ice_prepare_key(host->ice, lt_key, lt_key_size, eph_key);
}
+static int ufs_qcom_ice_scale_clk(struct ufs_qcom_host *host, unsigned long target_freq,
+ unsigned int flags)
+{
+ if (host->hba->caps & UFSHCD_CAP_CRYPTO)
+ return qcom_ice_scale_clk(host->ice, target_freq, flags);
+
+ return 0;
+}
+
static const struct blk_crypto_ll_ops ufs_qcom_crypto_ops = {
.keyslot_program = ufs_qcom_ice_keyslot_program,
.keyslot_evict = ufs_qcom_ice_keyslot_evict,
@@ -339,6 +348,12 @@ static void ufs_qcom_config_ice_allocator(struct ufs_qcom_host *host)
{
}
+static int ufs_qcom_ice_scale_clk(struct ufs_qcom_host *host, unsigned long target_freq,
+ unsigned int flags)
+{
+ return 0;
+}
+
#endif
static void ufs_qcom_disable_lane_clks(struct ufs_qcom_host *host)
@@ -1646,8 +1661,12 @@ static int ufs_qcom_clk_scale_notify(struct ufs_hba *hba, bool scale_up,
else
err = ufs_qcom_clk_scale_down_post_change(hba, target_freq);
+ if (!err)
+ err = ufs_qcom_ice_scale_clk(host, target_freq,
+ scale_up ? ICE_CLOCK_ROUND_FLOOR
+ : ICE_CLOCK_ROUND_CEIL);
- if (err) {
+ if (err && err != -EOPNOTSUPP) {
ufshcd_uic_hibern8_exit(hba);
return err;
}
--
2.34.1
On 19/02/2026 10:39, Abhinaba Rakshit wrote: > Implement ICE (Inline Crypto Engine) clock scaling in sync with > UFS controller clock scaling. This ensures that the ICE operates at > an appropriate frequency when the UFS clocks are scaled up or down, > improving performance and maintaining stability for crypto operations. > > Incase of OPP scaling is not supported by ICE, ensure to not prevent > devfreq for UFS, as ICE OPP-table is optional. > > Acked-by: Manivannan Sadhasivam <mani@kernel.org> > Signed-off-by: Abhinaba Rakshit <abhinaba.rakshit@oss.qualcomm.com> > --- > drivers/ufs/host/ufs-qcom.c | 21 ++++++++++++++++++++- SCSI/UFS is not respecting subsystem boundaries, thus you must not combine multiple subsystem when targeting UFS. Please split your patches. Best regards, Krzysztof
On Wed, Feb 25, 2026 at 10:00:12AM +0100, Krzysztof Kozlowski wrote: > On 19/02/2026 10:39, Abhinaba Rakshit wrote: > > Implement ICE (Inline Crypto Engine) clock scaling in sync with > > UFS controller clock scaling. This ensures that the ICE operates at > > an appropriate frequency when the UFS clocks are scaled up or down, > > improving performance and maintaining stability for crypto operations. > > > > Incase of OPP scaling is not supported by ICE, ensure to not prevent > > devfreq for UFS, as ICE OPP-table is optional. > > > > Acked-by: Manivannan Sadhasivam <mani@kernel.org> > > Signed-off-by: Abhinaba Rakshit <abhinaba.rakshit@oss.qualcomm.com> > > --- > > drivers/ufs/host/ufs-qcom.c | 21 ++++++++++++++++++++- > > > SCSI/UFS is not respecting subsystem boundaries, thus you must not > combine multiple subsystem when targeting UFS. > > Please split your patches. Sorry, if I fail to understand the context here. This patch-series is already split into 4 patches based on the subsystem. If the concern is the UFS patch mixing subsystem explanations, I can refine the commit message. Otherwise, if you expect the UFS patch to be sent as a separate patch-series, please let me know — though I feel these patches are more appropriate to land together as they are quite related. Abhinaba Rakshit
On 25/02/2026 13:58, Abhinaba Rakshit wrote: > On Wed, Feb 25, 2026 at 10:00:12AM +0100, Krzysztof Kozlowski wrote: >> On 19/02/2026 10:39, Abhinaba Rakshit wrote: >>> Implement ICE (Inline Crypto Engine) clock scaling in sync with >>> UFS controller clock scaling. This ensures that the ICE operates at >>> an appropriate frequency when the UFS clocks are scaled up or down, >>> improving performance and maintaining stability for crypto operations. >>> >>> Incase of OPP scaling is not supported by ICE, ensure to not prevent >>> devfreq for UFS, as ICE OPP-table is optional. >>> >>> Acked-by: Manivannan Sadhasivam <mani@kernel.org> >>> Signed-off-by: Abhinaba Rakshit <abhinaba.rakshit@oss.qualcomm.com> >>> --- >>> drivers/ufs/host/ufs-qcom.c | 21 ++++++++++++++++++++- >> >> >> SCSI/UFS is not respecting subsystem boundaries, thus you must not >> combine multiple subsystem when targeting UFS. >> >> Please split your patches. > > Sorry, if I fail to understand the context here. > This patch-series is already split into 4 patches based on the subsystem. s/patches/patchset/ Please split the patchset to not combine independent patches targeting different subsystem into one patchset. Best regards, Krzysztof
On Wed, Feb 25, 2026 at 03:12:18PM +0100, Krzysztof Kozlowski wrote: > On 25/02/2026 13:58, Abhinaba Rakshit wrote: > > On Wed, Feb 25, 2026 at 10:00:12AM +0100, Krzysztof Kozlowski wrote: > >> On 19/02/2026 10:39, Abhinaba Rakshit wrote: > >>> Implement ICE (Inline Crypto Engine) clock scaling in sync with > >>> UFS controller clock scaling. This ensures that the ICE operates at > >>> an appropriate frequency when the UFS clocks are scaled up or down, > >>> improving performance and maintaining stability for crypto operations. > >>> > >>> Incase of OPP scaling is not supported by ICE, ensure to not prevent > >>> devfreq for UFS, as ICE OPP-table is optional. > >>> > >>> Acked-by: Manivannan Sadhasivam <mani@kernel.org> > >>> Signed-off-by: Abhinaba Rakshit <abhinaba.rakshit@oss.qualcomm.com> > >>> --- > >>> drivers/ufs/host/ufs-qcom.c | 21 ++++++++++++++++++++- > >> > >> > >> SCSI/UFS is not respecting subsystem boundaries, thus you must not > >> combine multiple subsystem when targeting UFS. > >> > >> Please split your patches. > > > > Sorry, if I fail to understand the context here. > > This patch-series is already split into 4 patches based on the subsystem. > > s/patches/patchset/ > Please split the patchset to not combine independent patches targeting > different subsystem into one patchset. In this series, the UFS subsystem patch depends on the new ICE clock-scaling API introduced in the crypto/ICE patch. Without that ICE change, the UFS driver cannot call the scaling helper, so the UFS subsystem patch cannot be applied *independently*. Given this dependency, splitting the series into separate, standalone patchsets would break bisectability and lead to build/runtime failures if they are not merged together. Please let me know what is the preferred approach in such instance. Abhinaba Rakshit
On 26/02/2026 07:14, Abhinaba Rakshit wrote: > On Wed, Feb 25, 2026 at 03:12:18PM +0100, Krzysztof Kozlowski wrote: >> On 25/02/2026 13:58, Abhinaba Rakshit wrote: >>> On Wed, Feb 25, 2026 at 10:00:12AM +0100, Krzysztof Kozlowski wrote: >>>> On 19/02/2026 10:39, Abhinaba Rakshit wrote: >>>>> Implement ICE (Inline Crypto Engine) clock scaling in sync with >>>>> UFS controller clock scaling. This ensures that the ICE operates at >>>>> an appropriate frequency when the UFS clocks are scaled up or down, >>>>> improving performance and maintaining stability for crypto operations. >>>>> >>>>> Incase of OPP scaling is not supported by ICE, ensure to not prevent >>>>> devfreq for UFS, as ICE OPP-table is optional. >>>>> >>>>> Acked-by: Manivannan Sadhasivam <mani@kernel.org> >>>>> Signed-off-by: Abhinaba Rakshit <abhinaba.rakshit@oss.qualcomm.com> >>>>> --- >>>>> drivers/ufs/host/ufs-qcom.c | 21 ++++++++++++++++++++- >>>> >>>> >>>> SCSI/UFS is not respecting subsystem boundaries, thus you must not >>>> combine multiple subsystem when targeting UFS. >>>> >>>> Please split your patches. >>> >>> Sorry, if I fail to understand the context here. >>> This patch-series is already split into 4 patches based on the subsystem. >> >> s/patches/patchset/ >> Please split the patchset to not combine independent patches targeting >> different subsystem into one patchset. > > In this series, the UFS subsystem patch depends on the new ICE clock-scaling > API introduced in the crypto/ICE patch. Without that ICE change, the UFS > driver cannot call the scaling helper, so the UFS subsystem patch cannot > be applied *independently*. What? Where is this explained in the cover letter? Where is merging dependencies/order mentioned? > > Given this dependency, splitting the series into separate, standalone > patchsets would break bisectability and lead to build/runtime failures > if they are not merged together. > > Please let me know what is the preferred approach in such instance. > > Abhinaba Rakshit Best regards, Krzysztof
On Thu, Feb 26, 2026 at 07:40:04AM +0100, Krzysztof Kozlowski wrote: > On 26/02/2026 07:14, Abhinaba Rakshit wrote: > > On Wed, Feb 25, 2026 at 03:12:18PM +0100, Krzysztof Kozlowski wrote: > >> On 25/02/2026 13:58, Abhinaba Rakshit wrote: > >>> On Wed, Feb 25, 2026 at 10:00:12AM +0100, Krzysztof Kozlowski wrote: > >>>> On 19/02/2026 10:39, Abhinaba Rakshit wrote: > >>>>> Implement ICE (Inline Crypto Engine) clock scaling in sync with > >>>>> UFS controller clock scaling. This ensures that the ICE operates at > >>>>> an appropriate frequency when the UFS clocks are scaled up or down, > >>>>> improving performance and maintaining stability for crypto operations. > >>>>> > >>>>> Incase of OPP scaling is not supported by ICE, ensure to not prevent > >>>>> devfreq for UFS, as ICE OPP-table is optional. > >>>>> > >>>>> Acked-by: Manivannan Sadhasivam <mani@kernel.org> > >>>>> Signed-off-by: Abhinaba Rakshit <abhinaba.rakshit@oss.qualcomm.com> > >>>>> --- > >>>>> drivers/ufs/host/ufs-qcom.c | 21 ++++++++++++++++++++- > >>>> > >>>> > >>>> SCSI/UFS is not respecting subsystem boundaries, thus you must not > >>>> combine multiple subsystem when targeting UFS. > >>>> > >>>> Please split your patches. > >>> > >>> Sorry, if I fail to understand the context here. > >>> This patch-series is already split into 4 patches based on the subsystem. > >> > >> s/patches/patchset/ > >> Please split the patchset to not combine independent patches targeting > >> different subsystem into one patchset. > > > > In this series, the UFS subsystem patch depends on the new ICE clock-scaling > > API introduced in the crypto/ICE patch. Without that ICE change, the UFS > > driver cannot call the scaling helper, so the UFS subsystem patch cannot > > be applied *independently*. > > What? Where is this explained in the cover letter? Where is merging > dependencies/order mentioned? Get it. Will ensure to add the details on patch dependencies and merge order in the next patchset. Abhinaba Rakshit
© 2016 - 2026 Red Hat, Inc.