Skip to content

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

Open
Pradeep-pvk wants to merge 2 commits into
qualcomm-linux:qcom-6.18.yfrom
Pradeep-pvk:qcom-6.18.y
Open

scsi: ufs: ufs-qcom: Enable SKIP DEVICE RESET Quirk#641
Pradeep-pvk wants to merge 2 commits into
qualcomm-linux:qcom-6.18.yfrom
Pradeep-pvk:qcom-6.18.y

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

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>
@Pradeep-pvk Pradeep-pvk requested review from a team, aiquny, idlethread and quic-kaushalk June 1, 2026 11:44
@qswat-orbit-external
Copy link
Copy Markdown

Merge Check Failed: CR Not Eligible for Merge

CR 4410143 is not eligible for merge.

The parent software image for kernel.qli.2.0 is not development complete.

Entity: kernel.qli.2.0
CR: 4410143
Reason: CR_CANNOT_MERGE

Please ensure the CR passes both CCT (ComponentChangeTasks) and ICT (Integration Change Tasks) validations.

@qlijarvis
Copy link
Copy Markdown

PR #641 — validate-patch

PR: #641

Verdict Issues Detailed Report
⚠️ 2 Full report

Final Summary

  1. Lore link present: Yes — both commits have valid lore.kernel.org links to the linux-scsi mailing list (message-IDs 20260531235011.1052706-2 and -3)

  2. Lore link matches PR commits: Cannot fully verify (network restricted) — however, commit structure, authorship, Link tags, and diff content are consistent with proper FROMLIST workflow. The typo "curreny" in commit 1 should be verified against the lore source and corrected if it exists only in the PR.

  3. Upstream patch status: ⏳ Decision Pending — patches posted 2026-05-31 to linux-scsi mailing list; very recent submission, under community review. Cannot verify acceptance/rejection signals due to network restrictions.

  4. PR present in qcom-next: No — neither commit found in origin/qcom-next (searched by file path and recent commits). This is expected for FROMLIST patches that are still under upstream review and have not yet been merged to maintainer trees.

Verdict: ⚠️ — click to expand

🔍 Patch Validation

PR: #641
Upstream commits:

Commit Message

Commit 1/2: FROMLIST: scsi: ufs: core: Add UFSHCD_QUIRK_SKIP_DEVICE_RESET quirk

Check Status Note
Subject matches upstream FROMLIST prefix correctly applied
Body preserves rationale Clear explanation of OCP issue and quirk purpose
Fixes tag present/correct N/A New feature, no Fixes tag needed
Authorship preserved FROMLIST: original author's Signed-off-by present
Backport note (if applicable) N/A FROMLIST, not a backport
Typo in commit message ⚠️ "curreny" should be "current" (line 11 of body)

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

Check Status Note
Subject matches upstream FROMLIST prefix correctly applied
Body preserves rationale References previous fix, explains Micron-specific issue
Fixes tag present/correct N/A Enhancement, not a fix
Authorship preserved FROMLIST: original author's Signed-off-by present
Backport note (if applicable) N/A FROMLIST, not a backport
Referenced commit format Commit 5127be4 properly referenced with subject

Diff

Commit 1/2:

File Status Notes
include/ufs/ufshcd.h Clean addition of UFSHCD_QUIRK_SKIP_DEVICE_RESET (bit 27) with proper documentation

Commit 2/2:

File Status Notes
drivers/ufs/host/ufs-qcom.c Adds quirk check in suspend path and enables for Micron vendor; well-commented

Issues

Commit 1/2:

  • Typo in commit message: Line "blocks and causing the device to draw a large curreny during this time." should read "current" instead of "curreny".

Commit 2/2:

  • No issues found.

Upstream Patch Status

Commit Community Verdict
scsi: ufs: core: Add UFSHCD_QUIRK_SKIP_DEVICE_RESET quirk ⏳ Decision Pending — posted 2026-05-31, under review (cannot verify lore thread due to network restrictions)
scsi: ufs: ufs-qcom: Enable SKIP DEVICE RESET Quirk ⏳ Decision Pending — posted 2026-05-31, under review (cannot verify lore thread due to network restrictions)

qcom-next Presence

Commit Status
scsi: ufs: core: Add UFSHCD_QUIRK_SKIP_DEVICE_RESET quirk ⚠️ Not in qcom-next — patch recently posted, not yet landed
scsi: ufs: ufs-qcom: Enable SKIP DEVICE RESET Quirk ⚠️ Not in qcom-next — patch recently posted, not yet landed

Verdict

Merge with minor correction recommended. The patches are well-structured FROMLIST commits with proper lore links, correct authorship attribution, and clean diffs. The implementation addresses a legitimate OCP issue for Micron UFS devices. However, there is a typo in commit 1's message ("curreny" → "current") that should be corrected before merge. The patches are not yet in qcom-next, which is expected for recently-posted upstream patches still under review.

Final Summary

  1. Lore link present: Yes — both commits have valid lore.kernel.org links to the linux-scsi mailing list (message-IDs 20260531235011.1052706-2 and -3)

  2. Lore link matches PR commits: Cannot fully verify (network restricted) — however, commit structure, authorship, Link tags, and diff content are consistent with proper FROMLIST workflow. The typo "curreny" in commit 1 should be verified against the lore source and corrected if it exists only in the PR.

  3. Upstream patch status: ⏳ Decision Pending — patches posted 2026-05-31 to linux-scsi mailing list; very recent submission, under community review. Cannot verify acceptance/rejection signals due to network restrictions.

  4. PR present in qcom-next: No — neither commit found in origin/qcom-next (searched by file path and recent commits). This is expected for FROMLIST patches that are still under upstream review and have not yet been merged to maintainer trees.

@qlijarvis
Copy link
Copy Markdown

PR #641 — checker-log-analyzer

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

Checker Result Summary
Checker Result Summary
checkpatch No style issues
dt-binding-check ⏭️ Skipped (no DT binding changes)
dtb-check ⏭️ Skipped (no DTS changes)
sparse-check No static analysis warnings
check-uapi-headers No UAPI ABI changes
check-patch-compliance Content mismatch on commit 1/2
tag-check Both commits have FROMLIST: prefix
qcom-next-check ⚠️ Target is qcom-6.18.y — FROMLIST commits should ideally target qcom-next first

Detailed report: Full report

Checker analysis — click to expand

🤖 CI Checker Analysis (checker-log-analyzer)

PR: #641 — FROMLIST: scsi: ufs: Add UFSHCD_QUIRK_SKIP_DEVICE_RESET quirk
Source: https://github.com/qualcomm-linux/kernel-config/actions/runs/26752894598
Target branch: qcom-6.18.y

Checker Result Summary
checkpatch No style issues
dt-binding-check ⏭️ Skipped (no DT binding changes)
dtb-check ⏭️ Skipped (no DTS changes)
sparse-check No static analysis warnings
check-uapi-headers No UAPI ABI changes
check-patch-compliance Content mismatch on commit 1/2
tag-check Both commits have FROMLIST: prefix
qcom-next-check ⚠️ Target is qcom-6.18.y — FROMLIST commits should ideally target qcom-next first

❌ check-patch-compliance

Root cause: Commit 29eb955 ("FROMLIST: scsi: ufs: core: Add UFSHCD_QUIRK_SKIP_DEVICE_RESET quirk") has content differences from the upstream patch at the provided Link.

Failure details:

Checking commit: FROMLIST: scsi: ufs: core: Add UFSHCD_QUIRK_SKIP_DEVICE_RESET quirk
Change is different from the one mentioned in Link

Analysis:

The checker detected that the patch content in the PR differs from the upstream patch posted at:

Possible causes:

  1. Typo fix or local modification — The PR commit body contains "curreny" (typo) which may have been fixed in a later upstream revision, or the PR may have local adaptations not present upstream.
  2. Extra Signed-off-by — The PR has Signed-off-by: Pradeep P V K <pradeep.pragallapati@oss.qualcomm.com> which may not be in the upstream patch.
  3. Context-only diff — The checker may be flagging context line differences that aren't actual code changes.

Fix:

  1. Fetch the upstream patch and compare:

    b4 am --single-message -C -l -3 \
      https://lore.kernel.org/linux-scsi/20260531235011.1052706-2-nitin.rawat@oss.qualcomm.com/ \
      -o /tmp/upstream
    
    # Compare the actual code changes (+/- lines only):
    diff <(git format-patch -1 29eb955c2eba --stdout | \
           awk '/^diff/,/^--$/' | grep -E '^[+-][^+-]') \
         <(awk '/^diff/,/^--$/' /tmp/upstream/*.mbx | grep -E '^[+-][^+-]')
  2. If the difference is legitimate (e.g., backport adaptation, typo fix):

    • Document the change in the commit message with a note like:
      [ Pradeep: Fixed typo "curreny" → "current" in commit message ]
      
    • Or use BACKPORT: prefix instead of FROMLIST: if the patch has been modified.
  3. If the difference is an extra Signed-off-by:

    • This is acceptable if Pradeep P V K genuinely co-developed the patch.
    • The checker may still flag it; this is a known limitation.
  4. If the upstream patch has been updated:

    • Update the Link to point to the latest revision (e.g., -v2, -v3).
    • Ensure the PR patch matches the latest upstream version.

Reproduce locally:

cd /path/to/kernel
git checkout qcom-6.18.y
git fetch origin pull/641/head:pr-641
git checkout pr-641

# Run the compliance checker:
../kernel-checkers/check-patch-compliance.sh \
  --kernel-src . \
  --base b7cce9a3884a873855693af8591d4c9c469cd17e \
  --head 7714c548be1606a4d4e05cb11f08a0101e8c4f30

⚠️ qcom-next-check (advisory)

Observation: This PR targets qcom-6.18.y and contains FROMLIST: commits (patches posted upstream but not yet merged).

Best practice: FROMLIST: patches should ideally be merged into qcom-next first, then backported to stable branches like qcom-6.18.y once they've been validated in the integration branch.

Recommendation:

  • If these patches are intended for immediate stable release, document the rationale (e.g., critical bug fix, customer requirement).
  • If not urgent, consider merging to qcom-next first, then cherry-picking to qcom-6.18.y after validation.

Verdict

1 blocker to fix before merge:

  • Resolve the content mismatch in commit 29eb955 by either:
    • Updating the patch to match upstream exactly, or
    • Documenting the intentional differences in the commit message, or
    • Changing the prefix to BACKPORT: if the patch has been modified.

All other checkers passed cleanly. Once the content mismatch is resolved, the PR will be ready to merge.

@qcomlnxci
Copy link
Copy Markdown

Test Matrix

Test Case lemans-evk monaco-evk qcs615-ride qcs6490-rb3gen2 qcs8300-ride qcs9100-ride-r3 x1e80100-crd
BT_FW_KMD_Service ✅ Pass ✅ Pass ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️
BT_ON_OFF ✅ Pass ✅ Pass ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️
BT_SCAN ✅ Pass ✅ Pass ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️
CPUFreq_Validation ✅ Pass ✅ Pass ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️
CPU_affinity ✅ Pass ✅ Pass ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️
DSP_AudioPD ✅ Pass ✅ Pass ⚠️ skip ✅ Pass ✅ Pass ⚠️ skip ◻️
Ethernet ⚠️ skip ✅ Pass ⚠️ skip ⚠️ skip ⚠️ skip ⚠️ skip ◻️
Freq_Scaling ✅ Pass ✅ Pass ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️
GIC ✅ Pass ✅ Pass ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️
IPA ✅ Pass ✅ Pass ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️
Interrupts ✅ Pass ✅ Pass ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️
OpenCV ✅ Pass ⚠️ skip ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️
PCIe ✅ Pass ✅ Pass ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️
Probe_Failure_Check ❌ Fail ❌ Fail ✅ Pass ❌ Fail ❌ Fail ❌ Fail ◻️
RMNET ✅ Pass ✅ Pass ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️
UFS_Validation ✅ Pass ✅ Pass ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️
USBHost ❌ Fail ✅ Pass ❌ Fail ❌ Fail ❌ Fail ❌ Fail ◻️
WiFi_Firmware_Driver ❌ Fail ⚠️ skip ❌ Fail ✅ Pass ✅ Pass ✅ Pass ◻️
WiFi_OnOff ✅ Pass ❌ Fail ⚠️ skip ✅ Pass ✅ Pass ✅ Pass ◻️
adsp_remoteproc ✅ Pass ✅ Pass ✅ Pass ✅ Pass ✅ Pass ❌ Fail ◻️
cdsp_remoteproc ✅ Pass ✅ Pass ✅ Pass ✅ Pass ✅ Pass ❌ Fail ◻️
gpdsp_remoteproc ✅ Pass ✅ Pass ⚠️ skip ⚠️ skip ✅ Pass ❌ Fail ◻️
hotplug ✅ Pass ✅ Pass ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️
irq ✅ Pass ✅ Pass ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️
kaslr ✅ Pass ✅ Pass ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️
pinctrl ✅ Pass ✅ Pass ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️
qcom_hwrng ✅ Pass ✅ Pass ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️
remoteproc ✅ Pass ✅ Pass ✅ Pass ✅ Pass ✅ Pass ❌ Fail ◻️
rngtest ✅ Pass ✅ Pass ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️
shmbridge ✅ Pass ✅ Pass ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️
smmu ❌ Fail ✅ Pass ❌ Fail ✅ Pass ✅ Pass ❌ Fail ◻️
watchdog ✅ Pass ✅ Pass ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️
wpss_remoteproc ✅ Pass ✅ Pass ⚠️ skip ✅ Pass ✅ Pass ✅ Pass ◻️

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.

5 participants