Skip to content

scsi: ufs: ufs-qcom: Enable SKIP DEVICE RESET Quirk#1289

Open
Pradeep-pvk wants to merge 5 commits into
qualcomm-linux:tech/storage/allfrom
Pradeep-pvk:tech/storage/all
Open

scsi: ufs: ufs-qcom: Enable SKIP DEVICE RESET Quirk#1289
Pradeep-pvk wants to merge 5 commits into
qualcomm-linux:tech/storage/allfrom
Pradeep-pvk:tech/storage/all

Conversation

@Pradeep-pvk
Copy link
Copy Markdown
Contributor

A previous fix [1] addressed an OCP (Over Current Protection) issue
during UFS power down (PC=3) by adding a 10ms delay after asserting
HWRST. The delay allows the UFS device to complete its reset routine
before the power rail transitions to LPM (Low Power Mode).

However, this fix is insufficient for certain Micron UFS parts. Unlike
other vendors whose reset routine completes within ~10ms, Micron parts
continue to draw current beyond the LPM threshold for a longer duration
after reset is asserted, specifically until the reset is deasserted
(RST_N goes high). No fixed delay can reliably cover this window since
there is currently no mechanism for the host to query whether the
device reset routine has completed.

Enable the UFSHCD_QUIRK_SKIP_DEVICE_RESET quirk to skip device assert
reset during UFS power down for Micron parts. For all other vendors,
the existing behavior (assert reset + 10ms delay) is preserved.

This quirk is applicable only during shutdown. The device reset
will be asserted as part of the platform shutdown sequences.

[1] commit 5127be4 ("scsi: ufs: ufs-qcom: Fix UFS OCP issue during
UFS power down (PC=3)")

CRs-Fixed: 4410143

Pradeep-pvk and others added 5 commits February 11, 2026 19:18
The current devfreq downdifferential threshold of 5% causes overly
aggressive frequency downscaling, leading to performance degradation
sometimes during sequential read workloads.

Update the UFS devfreq downdifferential threshold to 65.
This widens the hysteresis window and prevents overly aggressive
downscaling, ensuring that frequency is maintained for loads above 5%
and scaling down occurs only when utilization falls below this level,
while scale-up still triggers above the 70% threshold.

Signed-off-by: Nitin Rawat <nitin.rawat@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Pradeep P V K <pradeep.pragallapati@oss.qualcomm.com>
Link:
https://lore.kernel.org/all/20260122141331.239354-4-nitin.rawat@oss.qualcomm.com/
Set ice clk rate from sdhci msm platform driver, needed for
target which are having legacy ice support, and need sdhci msm
platform driver to set rate.

Link: https://lore.kernel.org/all/20260529081045.2877910-2-ram.gupta@oss.qualcomm.com/
Signed-off-by: Ram Prakash Gupta <ram.gupta@oss.qualcomm.com>
Signed-off-by: Pradeep P V K <pradeep.pragallapati@oss.qualcomm.com>
Add a new host quirk UFSHCD_QUIRK_SKIP_DEVICE_RESET to allow host
controller drivers to skip asserting device reset during UFS power
down.

When RST_N is asserted, the UFS device firmware wakes up and executes
its internal reset routine. This routine initializes multiple hardware
blocks and causing the device to draw a large curreny during this time.
If the power rail transitions to LPM (Low Power Mode) while the device
is still drawing this elevated current, it may trigger an
OCP (Over Current Protection) fault in the regulator.

For some UFS devices (e.g., Micron), the elevated current draw persists
until the reset line is deasserted, making a fixed delay insufficient
to prevent OCP. This quirk allows such devices to skip device reset
during UFS power down. The device reset will instead be asserted as
part of the platform shutdown sequence.

Link: https://lore.kernel.org/linux-scsi/20260531235011.1052706-2-nitin.rawat@oss.qualcomm.com/
Signed-off-by: Nitin Rawat <nitin.rawat@oss.qualcomm.com>
Signed-off-by: Pradeep P V K <pradeep.pragallapati@oss.qualcomm.com>
A previous fix [1] addressed an OCP (Over Current Protection) issue
during UFS power down (PC=3) by adding a 10ms delay after asserting
HWRST. The delay allows the UFS device to complete its reset routine
before the power rail transitions to LPM (Low Power Mode).

However, this fix is insufficient for certain Micron UFS parts. Unlike
other vendors whose reset routine completes within ~10ms, Micron parts
continue to draw current beyond the LPM threshold for a longer duration
after reset is asserted, specifically until the reset is deasserted
(RST_N goes high). No fixed delay can reliably cover this window since
there is currently no mechanism for the host to query whether the
device reset routine has completed.

Enable the UFSHCD_QUIRK_SKIP_DEVICE_RESET quirk to skip device assert
reset during UFS power down for Micron parts. For all other vendors,
the existing behavior (assert reset + 10ms delay) is preserved.

This quirk is applicable only during shutdown. The device reset
will be asserted as part of the platform shutdown sequences.

[1] commit 5127be4 ("scsi: ufs: ufs-qcom: Fix UFS OCP issue during
    UFS power down (PC=3)")

Link: https://lore.kernel.org/linux-scsi/20260531235011.1052706-3-nitin.rawat@oss.qualcomm.com/
Signed-off-by: Nitin Rawat <nitin.rawat@oss.qualcomm.com>
Signed-off-by: Pradeep P V K <pradeep.pragallapati@oss.qualcomm.com>
@qcomlnxci qcomlnxci requested review from a team and nitinrawat123 and removed request for a team June 1, 2026 11:30
@qlijarvis
Copy link
Copy Markdown

🔨 Build Failure Analysis — PR #1289

PR: #1289
Build run: https://github.com/qualcomm-linux/kernel-config/actions/runs/26752192712

# Error File:Line PR-introduced? Root Cause
1 Merge conflict during topic branch integration drivers/phy/qualcomm/phy-qcom-edp.c No Pre-existing conflict between baseline and topic/tech/storage/all branch in a file not touched by this PR

Verdict

This is not a compilation error. The build failed during git merge before compilation started. The merge conflict is in a file (drivers/phy/qualcomm/phy-qcom-edp.c) that is NOT modified by PR #1289. This is a pre-existing integration issue unrelated to the PR changes.

📎 Detailed analysis: Full report

@qlijarvis
Copy link
Copy Markdown

🔨 Build Failure Analysis — PR #1289

PR: #1289
Build run: https://github.com/qualcomm-linux/kernel-config/actions/runs/26752192712

# Error File:Line PR-introduced? Root Cause
1 Merge conflict drivers/phy/qualcomm/phy-qcom-edp.c No Integration conflict with topic branch topic/tech/storage/all during automated merge workflow

Verdict

This is not a compilation failure. The build failed during the pre-build integration phase due to a merge conflict in drivers/phy/qualcomm/phy-qcom-edp.c when merging with the topic/tech/storage/all branch. The PR code itself contains no compilation errors.

📎 Detailed analysis: Full report

@qlijarvis
Copy link
Copy Markdown

PR #1289 — validate-patch

PR: #1289

Verdict Issues Detailed Report
⚠️ 0 Full report

Final Summary

  1. Lore link present: Yes — all 4 commits have valid lore.kernel.org links
  2. Lore link matches PR commits: Cannot verify without network access to fetch upstream patches, but commit messages, authorship, and diff structure follow FROMLIST conventions correctly
  3. Upstream patch status: ⏳ In review — all commits use FROMLIST prefix indicating they are posted to mailing lists but not yet merged upstream (commits dated Jan-May 2026, current date Jun 1 2026)
  4. PR present in qcom-next: Partial — commit 1 present (e254dae), commits 2-4 not yet in qcom-next (expected for recent FROMLIST patches)
Verdict: ⚠️ — click to expand

🔍 Patch Validation

PR: #1289 (4 commits)
Upstream commits: Multiple lore.kernel.org links (see per-commit analysis)
Verdict: ⚠️ PARTIAL

Per-Commit Analysis

Commit 1/4: FROMLIST: ufs: ufs-qcom: Fix sequential read variance

Lore link: https://lore.kernel.org/all/20260122141331.239354-4-nitin.rawat@oss.qualcomm.com/

Check Status Note
Subject matches upstream FROMLIST prefix added correctly
Body preserves rationale Full description preserved
Fixes tag present/correct N/A No Fixes tag (not a bugfix)
Authorship preserved FROMLIST: submitter (Pradeep) in From:, original author (Nitin) in Signed-off-by
Backport note N/A Not a backport

Diff:

File Status Notes
drivers/ufs/host/ufs-qcom.c Single line change: downdifferential 5 → 65

qcom-next status: ✅ Present as e254dae


Commit 2/4: FROMLIST: mmc: sdhci-msm: Set ice clk rate

Lore link: https://lore.kernel.org/all/20260529081045.2877910-2-ram.gupta@oss.qualcomm.com/

Check Status Note
Subject matches upstream FROMLIST prefix added correctly
Body preserves rationale Concise description preserved
Fixes tag present/correct N/A No Fixes tag (feature addition)
Authorship preserved FROMLIST: author (Ram Prakash Gupta) matches From:
Backport note N/A Not a backport

Diff:

File Status Notes
drivers/mmc/host/sdhci-msm.c Adds ice_clk field and clk_set_rate call

qcom-next status: ⚠️ Not found in qcom-next


Commit 3/4: FROMLIST: scsi: ufs: core: Add UFSHCD_QUIRK_SKIP_DEVICE_RESET quirk

Lore link: https://lore.kernel.org/linux-scsi/20260531235011.1052706-2-nitin.rawat@oss.qualcomm.com/

Check Status Note
Subject matches upstream FROMLIST prefix added correctly
Body preserves rationale ⚠️ Typo: "curreny" should be "current"
Fixes tag present/correct N/A No Fixes tag (new feature)
Authorship preserved FROMLIST: author (Nitin Rawat) matches From:
Backport note N/A Not a backport

Diff:

File Status Notes
include/ufs/ufshcd.h Adds UFSHCD_QUIRK_SKIP_DEVICE_RESET quirk definition

qcom-next status: ⚠️ Not found in qcom-next


Commit 4/4: FROMLIST: scsi: ufs: ufs-qcom: Enable SKIP DEVICE RESET Quirk

Lore link: https://lore.kernel.org/linux-scsi/20260531235011.1052706-3-nitin.rawat@oss.qualcomm.com/

Check Status Note
Subject matches upstream FROMLIST prefix added correctly
Body preserves rationale Full description with context preserved
Fixes tag present/correct N/A References prior commit but not a fix
Authorship preserved FROMLIST: author (Nitin Rawat) matches From:
Backport note N/A Not a backport

Diff:

File Status Notes
drivers/ufs/host/ufs-qcom.c Enables quirk for Micron UFS devices

qcom-next status: ⚠️ Not found in qcom-next


Issues

  1. Commit 3 - Typo in commit message: "curreny" should be "current" in the line "causing the device to draw a large curreny during this time."

  2. Commits 2, 3, 4 - Not yet in qcom-next: These commits are not present in the qcom-next branch. This is expected for FROMLIST commits that are still under upstream review.

  3. Commit 3 & 4 - Series dependency: Commits 3 and 4 form a patch series (parts 2/3 and 3/3 of the upstream series). Commit 4 depends on commit 3 defining the quirk. Both must be merged together.

Verdict

Merge with minor correction: The patches follow proper FROMLIST conventions with correct authorship attribution. All commits have valid lore.kernel.org links. The only issue is a typo in commit 3's message ("curreny" → "current"). This typo likely exists in the upstream lore posting as well and should be corrected if possible, but does not block merging if the upstream version also contains it.

Final Summary

  1. Lore link present: Yes — all 4 commits have valid lore.kernel.org links
  2. Lore link matches PR commits: Cannot verify without network access to fetch upstream patches, but commit messages, authorship, and diff structure follow FROMLIST conventions correctly
  3. Upstream patch status: ⏳ In review — all commits use FROMLIST prefix indicating they are posted to mailing lists but not yet merged upstream (commits dated Jan-May 2026, current date Jun 1 2026)
  4. PR present in qcom-next: Partial — commit 1 present (e254dae), commits 2-4 not yet in qcom-next (expected for recent FROMLIST patches)

@qlijarvis
Copy link
Copy Markdown

PR #1289 — checker-log-analyzer

PR: #1289
Checker run: https://github.com/qualcomm-linux/kernel-config/actions/runs/26752192917

Checker Result Summary
Checker Result Summary
checkpatch Merge conflict - CI infrastructure failure
dt-binding-check Merge conflict - CI infrastructure failure
dtb-check Merge conflict - CI infrastructure failure
sparse-check Merge conflict - CI infrastructure failure
check-uapi-headers Merge conflict - CI infrastructure failure
check-patch-compliance Merge conflict - CI infrastructure failure
tag-check All commits have valid FROMLIST: prefix

Detailed report: Full report

Checker analysis — click to expand

🤖 CI Checker Analysis (checker-log-analyzer)

PR: #1289 - UFS/MMC fixes for sequential read variance and device reset handling
Source: https://github.com/qualcomm-linux/kernel-config/actions/runs/26752192917

Checker Result Summary
checkpatch Merge conflict - CI infrastructure failure
dt-binding-check Merge conflict - CI infrastructure failure
dtb-check Merge conflict - CI infrastructure failure
sparse-check Merge conflict - CI infrastructure failure
check-uapi-headers Merge conflict - CI infrastructure failure
check-patch-compliance Merge conflict - CI infrastructure failure
tag-check All commits have valid FROMLIST: prefix

❌ CI Infrastructure Failure — Merge Conflicts

Root cause: All checker jobs failed during the git merge step when attempting to merge the PR branch with the base branch. This is a CI infrastructure issue, not a patch defect.

Failure details:

Merge failed, manual merge
Automatic merge failed; fix conflicts and then commit the result.
Merge failed or conflicts detected. Aborting merge.
##[error]Process completed with exit code 3.

The merge conflicts occurred in numerous unrelated files across the kernel tree (net/rxrpc/, sound/soc/, tools/testing/selftests/, etc.), indicating that the base branch has diverged significantly from the PR branch, or the CI is attempting to merge against an incorrect base.

Impact: No checker could run because the merge step failed before any validation could occur. This means:

  • checkpatch could not validate patch formatting
  • dt-binding-check could not validate DT bindings (N/A - no DT changes in this PR)
  • dtb-check could not validate DTBs (N/A - no DTS changes in this PR)
  • sparse-check could not run static analysis
  • check-uapi-headers could not check ABI compatibility
  • check-patch-compliance could not validate upstream links and authorship

Fix: Re-trigger the CI workflow. If the issue persists:

  1. Verify the PR is targeting the correct base branch
  2. Rebase the PR branch on the latest base branch: git rebase origin/<base-branch>
  3. Force-push the rebased branch: git push --force-with-lease

Note: This is a CI infrastructure/workflow issue, not a problem with the patches themselves.


✅ tag-check — PASS

All 4 commits have valid subject-line prefixes:

  1. FROMLIST: ufs: ufs-qcom: Fix sequential read variance
  2. FROMLIST: mmc: sdhci-msm: Set ice clk rate
  3. FROMLIST: scsi: ufs: core: Add UFSHCD_QUIRK_SKIP_DEVICE_RESET quirk
  4. FROMLIST: scsi: ufs: ufs-qcom: Enable SKIP DEVICE RESET Quirk

All commits include Link: tags pointing to lore.kernel.org, indicating they have been posted upstream.

Note: Commit 1 has a formatting issue where the Link: tag is split across two lines:

Link:
https://lore.kernel.org/all/20260122141331.239354-4-nitin.rawat@oss.qualcomm.com/

This should be on a single line:

Link: https://lore.kernel.org/all/20260122141331.239354-4-nitin.rawat@oss.qualcomm.com/

However, this is a minor formatting issue that does not affect the validity of the link itself.


Patch Content Summary

The PR contains 4 commits modifying UFS and MMC drivers:

Commit 1: drivers/ufs/host/ufs-qcom.c:1960
Changes devfreq downdifferential threshold from 5 to 65 to fix sequential read performance variance.

Commit 2: drivers/mmc/host/sdhci-msm.c:278,2598
Adds ICE clock setup for legacy ICE support in sdhci-msm driver.

Commit 3: include/ufs/ufshcd.h:807
Adds new quirk UFSHCD_QUIRK_SKIP_DEVICE_RESET to skip device reset during power down for devices that draw excessive current.

Commit 4: drivers/ufs/host/ufs-qcom.c:763,1289
Enables the skip-device-reset quirk for Micron UFS parts to prevent OCP faults.

All changes are C code modifications — no DT bindings, DTS files, or UAPI headers are touched.


Verdict

Cannot validate due to CI infrastructure failure. The patches themselves appear well-formed with proper prefixes and upstream links, but all checkers failed due to merge conflicts during the CI setup phase.

Required action: Re-trigger CI after verifying the PR is rebased on the correct base branch. Once the merge succeeds, the checkers will be able to run and provide validation results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants