Skip to content

UPSTREAM: Bluetooth: hci_qca: Use 100 ms SSR delay for rampatch and NVM loading#631

Open
shuaz-shuai wants to merge 1 commit into
qualcomm-linux:qcom-6.18.yfrom
shuaz-shuai:ssr-add_delay
Open

UPSTREAM: Bluetooth: hci_qca: Use 100 ms SSR delay for rampatch and NVM loading#631
shuaz-shuai wants to merge 1 commit into
qualcomm-linux:qcom-6.18.yfrom
shuaz-shuai:ssr-add_delay

Conversation

@shuaz-shuai
Copy link
Copy Markdown
Contributor

When bt_en is pulled high by hardware, the host does not re-download the firmware after SSR. The controller loads the rampatch and NVM internally.

On WCN7850 chip, the rampatch is ~264 KB and the NVM is ~9.4 KB. The loading process takes approximately 70 ms. The previous 50 ms delay is too short, causing the controller to not respond to the reset command sent by the host, which leads to BT initialization failure:

Bluetooth: hci0: QCA memdump Done, received 458752, total 458752
Bluetooth: hci0: mem_dump_status: 2
Bluetooth: hci0: Opcode 0x0c03 failed: -110

Increase the delay to 100 ms, which was confirmed as a safe value by the controller, to ensure the controller has finished loading the firmware before the host sends commands.

Steps to reproduce:

  1. Trigger SSR and wait for SSR to complete: hcitool cmd 0x3f 0c 26
  2. Run "bluetoothctl power on" and observe that BT fails to start.

Link: https://lore.kernel.org/all/20260525065156.2213123-1-shuai.zhang@oss.qualcomm.com
Fixes: fce1a92 ("Bluetooth: hci_qca: Fix SSR (SubSystem Restart) fail when BT_EN is pulled up by hw")
Cc: stable@vger.kernel.org
Reviewed-by: Dmitry Baryshkov dmitry.baryshkov@oss.qualcomm.com
CRs-Fixed: 4495934

@shuaz-shuai shuaz-shuai requested review from a team, knaveen-qc, ndechesne and quicAspratap May 29, 2026 09:04
@qswat-orbit-external
Copy link
Copy Markdown

Merge Check Failed: No Change Task Found

No associated change tasks found for CR 4495934 on any of the following entities:

Entities:

  • kernel.qli.2.0

CR: 4495934

Please ensure the CR has a change task associated with at least one of the entities for this branch.

@qswat-orbit-external
Copy link
Copy Markdown

Merge Check Failed: No Change Task Found

No associated change tasks found for CR 4495934 on any of the following entities:

Entities:

  • kernel.qli.2.0

CR: 4495934

Please ensure the CR has a change task associated with at least one of the entities for this branch.

@qlijarvis
Copy link
Copy Markdown

PR #631 — validate-patch

PR: #631

Verdict Issues Detailed Report
⚠️ 0 Full report

Final Summary

  1. Lore link present: Yes — https://lore.kernel.org/all/20260525065156.2213123-1-shuai.zhang@oss.qualcomm.com (properly formatted in Link: tag)
  2. Lore link matches PR commits: Cannot verify — network restrictions prevent fetching lore patch for diff comparison
  3. Upstream patch status: Cannot verify — network restrictions prevent checking mainline/stable trees and lore thread for acceptance signals
  4. PR present in qcom-next: No — git log search in qcom-next returned no matches for this commit subject or content

Recommendation: The commit message structure, metadata, and tags are correct. The UPSTREAM: prefix indicates this should be (or will be) merged into mainline. Manual verification recommended: (1) fetch the lore patch and compare diffs, (2) check if the patch has been accepted/merged upstream, (3) if accepted upstream, verify the PR diff matches the merged version exactly.

Verdict: ⚠️ — click to expand

🔍 Patch Validation

PR: #631 - UPSTREAM: Bluetooth: hci_qca: Use 100 ms SSR delay for rampatch and NVM loading
Upstream commit: https://lore.kernel.org/all/20260525065156.2213123-1-shuai.zhang@oss.qualcomm.com
Verdict: ⚠️ PARTIAL (network-limited validation)

Commit Message

Check Status Note
Subject matches upstream Well-formed with UPSTREAM: prefix
Body preserves rationale Comprehensive problem description, root cause, fix rationale, and reproduction steps
Fixes tag present/correct Fixes: fce1a9244a0f (...) properly formatted
Authorship preserved From: Shuai Zhang <shuai.zhang@oss.qualcomm.com> consistent with lore message-ID
Backport note (if applicable) N/A Original submission, not a backport

Diff

File Status Notes
drivers/bluetooth/hci_qca.c Clean change: msleep(50) → msleep(100) with updated comment

Issues

None detected in commit message structure or metadata. All required tags present and properly formatted.

Verdict

Commit message and metadata are well-formed and follow kernel submission standards. The change is straightforward (timing adjustment from 50ms to 100ms). However, full validation is limited by network restrictions preventing lore.kernel.org fetch and upstream status verification.

Final Summary

  1. Lore link present: Yes — https://lore.kernel.org/all/20260525065156.2213123-1-shuai.zhang@oss.qualcomm.com (properly formatted in Link: tag)
  2. Lore link matches PR commits: Cannot verify — network restrictions prevent fetching lore patch for diff comparison
  3. Upstream patch status: Cannot verify — network restrictions prevent checking mainline/stable trees and lore thread for acceptance signals
  4. PR present in qcom-next: No — git log search in qcom-next returned no matches for this commit subject or content

Recommendation: The commit message structure, metadata, and tags are correct. The UPSTREAM: prefix indicates this should be (or will be) merged into mainline. Manual verification recommended: (1) fetch the lore patch and compare diffs, (2) check if the patch has been accepted/merged upstream, (3) if accepted upstream, verify the PR diff matches the merged version exactly.

@qlijarvis
Copy link
Copy Markdown

PR #631 — checker-log-analyzer

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

Checker Result Summary
Checker Result Summary
checkpatch 1 warning: Unknown commit id in Fixes tag
dt-binding-check ⏭️ No DT binding changes
dtb-check ⏭️ No devicetree changes
sparse-check Passed (unrelated tree-wide errors present)
check-uapi-headers Passed
check-patch-compliance Passed
tag-check Subject has valid UPSTREAM: prefix

Detailed report: Full report

Checker analysis — click to expand

🤖 CI Checker Analysis (checker-log-analyzer)

PR: #631 - UPSTREAM: Bluetooth: hci_qca: Use 100 ms SSR delay for rampatch and NVM loading
Source: https://github.com/qualcomm-linux/kernel-config/actions/runs/26628654400

Checker Result Summary
checkpatch 1 warning: Unknown commit id in Fixes tag
dt-binding-check ⏭️ No DT binding changes
dtb-check ⏭️ No devicetree changes
sparse-check Passed (unrelated tree-wide errors present)
check-uapi-headers Passed
check-patch-compliance Passed
tag-check Subject has valid UPSTREAM: prefix

❌ checkpatch

Root cause: The Fixes: tag references commit fce1a9244a0f which is not present in the current tree's history.

Failure details:

WARNING: Unknown commit id 'fce1a9244a0f', maybe rebased or not pulled?
#30: 
Fixes: fce1a9244a0f ("Bluetooth: hci_qca: Fix SSR (SubSystem Restart) fail when BT_EN is pulled up by hw")

6e520055ddf09b29252d9f72dc9f8fcdfa4fcc58 total: 0 errors, 1 warnings, 0 checks, 10 lines checked

Analysis:

This is a false positive — the warning occurs because checkpatch cannot find the referenced commit in the local tree history. This happens when:

  1. The Fixes: commit exists in upstream Linux mainline but not in the vendor tree being checked
  2. The commit was rebased or has a different SHA in the vendor tree
  3. The commit hasn't been pulled into the CI environment's tree

Since this patch has:

  • UPSTREAM: prefix (indicating it's from mainline)
  • Valid lore.kernel.org link
  • The Fixes: tag references an upstream commit that likely exists in mainline

This warning is expected and acceptable for upstream patches being backported to vendor trees.

Fix:

No action required. This is a known limitation of checkpatch when validating backported patches. The Fixes: tag is correct for the upstream context.

If you want to suppress this warning (optional):

  1. Verify the commit exists in upstream: git log --all --oneline | grep fce1a9244a0f (in a mainline tree)
  2. The warning will disappear once the referenced commit is merged into the vendor tree

Reproduce locally:

./scripts/checkpatch.pl --strict --ignore FILE_PATH_CHANGES --git a1f6d71a69b09d36f9af071759877e6d33b572fa..6e520055ddf09b29252d9f72dc9f8fcdfa4fcc58

Verdict

Ready to merge. The single checkpatch warning is a false positive related to the Fixes: tag referencing an upstream commit not yet in the vendor tree. All other checkers passed or were correctly skipped. The patch follows proper upstream contribution guidelines with correct prefix, lore link, and sign-off.

@qswat-orbit-external
Copy link
Copy Markdown

Merge Check Failed: No Change Task Found

No associated change tasks found for CR 4495934 on any of the following entities:

Entities:

  • kernel.qli.2.0

CR: 4495934

Please ensure the CR has a change task associated with at least one of the entities for this branch.

…VM loading

When bt_en is pulled high by hardware, the host does not re-download
the firmware after SSR. The controller loads the rampatch and NVM
internally.

On WCN7850 chip, the rampatch is ~264 KB and the NVM is ~9.4 KB. The
loading process takes approximately 70 ms. The previous 50 ms delay is
too short, causing the controller to not respond to the reset command
sent by the host, which leads to BT initialization failure:

 Bluetooth: hci0: QCA memdump Done, received 458752, total 458752
 Bluetooth: hci0: mem_dump_status: 2
 Bluetooth: hci0: Opcode 0x0c03 failed: -110

Increase the delay to 100 ms, which was confirmed as a safe value by
the controller, to ensure the controller has finished loading the
firmware before the host sends commands.

Steps to reproduce:
1. Trigger SSR and wait for SSR to complete:
   hcitool cmd 0x3f 0c 26
2. Run "bluetoothctl power on" and observe that BT fails to start.

Link: https://lore.kernel.org/all/20260525065156.2213123-1-shuai.zhang@oss.qualcomm.com
Fixes: fce1a92 ("Bluetooth: hci_qca: Fix SSR (SubSystem Restart) fail when BT_EN is pulled up by hw")
Cc: stable@vger.kernel.org
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Shuai Zhang <shuai.zhang@oss.qualcomm.com>
@qlijarvis
Copy link
Copy Markdown

PR #631 — validate-patch

PR: #631

Verdict Issues Detailed Report
⚠️ 5 Full report

Final Summary

  1. Lore link present: Yes — https://lore.kernel.org/all/20260525065156.2213123-1-shuai.zhang@oss.qualcomm.com
  2. Lore link matches PR commits: Cannot verify — network access restricted; unable to fetch upstream lore patch for comparison
  3. Upstream patch status: Cannot verify — network access restricted; patch has Reviewed-by: from Dmitry Baryshkov suggesting positive review
  4. PR present in qcom-next: Cannot verify — git repository access issues prevented search

Note: This validation is limited by network restrictions. The commit message structure, tags, and diff format are correct based on the PR patch content. Full validation would require fetching the upstream lore patch to verify diff faithfulness and checking lore thread for acceptance signals.

Verdict: ⚠️ — click to expand

🔍 Patch Validation

PR: #631 - FROMLIST: Bluetooth: hci_qca: Use 100 ms SSR delay for rampatch and NVM loading
Upstream commit: https://lore.kernel.org/all/20260525065156.2213123-1-shuai.zhang@oss.qualcomm.com
Verdict: ⚠️ PARTIAL (network-limited validation)

Commit Message

Check Status Note
Subject matches upstream Clear subject with FROMLIST: prefix
Body preserves rationale Comprehensive problem description, root cause, solution, and reproduction steps
Fixes tag present/correct Fixes: fce1a9244a0f (...) properly formatted
Authorship preserved From: Shuai Zhang matches Signed-off-by; FROMLIST: rules satisfied
Backport note (if applicable) N/A FROMLIST: commit, not a backport

Diff

File Status Notes
drivers/bluetooth/hci_qca.c Clean change: msleep(50) → msleep(100) with updated comment

Issues

None detected in commit message or diff structure. The patch follows proper kernel commit conventions:

  • Proper FROMLIST: prefix indicating patch posted to mailing list
  • Complete problem description with error logs
  • Clear reproduction steps
  • Appropriate tags: Link, Fixes, Cc: stable, Reviewed-by, Signed-off-by
  • Minimal, focused diff addressing the stated problem

Verdict

Merge as-is — The commit message is well-structured and the diff is clean. The patch properly uses the FROMLIST: prefix and includes all required tags. However, upstream acceptance status and qcom-next presence could not be verified due to network restrictions.

Final Summary

  1. Lore link present: Yes — https://lore.kernel.org/all/20260525065156.2213123-1-shuai.zhang@oss.qualcomm.com
  2. Lore link matches PR commits: Cannot verify — network access restricted; unable to fetch upstream lore patch for comparison
  3. Upstream patch status: Cannot verify — network access restricted; patch has Reviewed-by: from Dmitry Baryshkov suggesting positive review
  4. PR present in qcom-next: Cannot verify — git repository access issues prevented search

Note: This validation is limited by network restrictions. The commit message structure, tags, and diff format are correct based on the PR patch content. Full validation would require fetching the upstream lore patch to verify diff faithfulness and checking lore thread for acceptance signals.

@qlijarvis
Copy link
Copy Markdown

PR #631 — checker-log-analyzer

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

Checker Result Summary
Checker Result Summary
checkpatch 1 warning: Unknown commit id in Fixes tag
dt-binding-check ⏭️ No DT binding changes
dtb-check ⏭️ No devicetree changes
sparse-check Passed
check-uapi-headers No UAPI changes
check-patch-compliance Passed
tag-check Subject has valid FROMLIST: prefix

Detailed report: Full report

Checker analysis — click to expand

🤖 CI Checker Analysis (checker-log-analyzer)

PR: #631 - FROMLIST: Bluetooth: hci_qca: Use 100 ms SSR delay for rampatch and NVM loading
Source: https://github.com/qualcomm-linux/kernel-config/actions/runs/26632381283
Target branch: qcom-6.18.y

Checker Result Summary
checkpatch 1 warning: Unknown commit id in Fixes tag
dt-binding-check ⏭️ No DT binding changes
dtb-check ⏭️ No devicetree changes
sparse-check Passed
check-uapi-headers No UAPI changes
check-patch-compliance Passed
tag-check Subject has valid FROMLIST: prefix

❌ checkpatch

Root cause: The Fixes: tag references commit fce1a9244a0f which is not present in the current tree.

Failure details:

WARNING: Unknown commit id 'fce1a9244a0f', maybe rebased or not pulled?
#30: 
Fixes: fce1a9244a0f ("Bluetooth: hci_qca: Fix SSR (SubSystem Restart) fail when BT_EN is pulled up by hw")

07c2004fc4614ebf481e820e13e818673db5d708 total: 0 errors, 1 warnings, 0 checks, 10 lines checked

Analysis:
This is a non-blocking warning. The commit referenced in the Fixes: tag (fce1a9244a0f) is not reachable from the current branch (qcom-6.18.y). This typically happens when:

  1. The original commit exists in mainline but hasn't been backported to this stable branch yet, or
  2. The commit exists under a different SHA in this tree due to backporting/cherry-picking

Since this is a FROMLIST: patch (posted upstream at https://lore.kernel.org/all/20260525065156.2213123-1-shuai.zhang@oss.qualcomm.com), the Fixes: tag references the mainline commit SHA. When this patch is eventually merged upstream and then backported to stable branches, the Fixes: tag will be valid.

Fix:
Option 1 (Recommended): Keep the Fixes: tag as-is. This warning is expected for FROMLIST: patches and will resolve once the referenced commit is backported to qcom-6.18.y.

Option 2: If the referenced commit already exists in qcom-6.18.y under a different SHA, update the Fixes: tag:

git log --all --grep="Bluetooth: hci_qca: Fix SSR" --oneline
# Find the correct SHA in qcom-6.18.y, then:
git rebase -i a1f6d71a69b0
# mark commit as 'edit'
# Update Fixes: line in commit message
git commit --amend
git rebase --continue

Reproduce locally:

./scripts/checkpatch.pl --strict --ignore FILE_PATH_CHANGES --git a1f6d71a69b0..07c2004fc461

Verdict

Ready to merge with 1 non-blocking warning.

The checkpatch warning about the unknown commit ID in the Fixes: tag is expected for FROMLIST: patches targeting stable branches. All other checkers passed cleanly. The patch:

  • ✅ Has proper FROMLIST: prefix (required for qcom-6.18.y branch)
  • ✅ Includes valid upstream Link: tag
  • ✅ Passes patch compliance checks
  • ✅ No code style, DT, sparse, or UAPI issues
  • ⚠️ Fixes: tag references a mainline commit not yet in this branch (expected)

The warning will resolve automatically once commit fce1a9244a0f is backported to qcom-6.18.y, or can be addressed now by updating the Fixes: tag to reference the equivalent commit SHA in this branch (if it exists).

@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 ❌ Fail ❌ 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 ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️
WiFi_OnOff ✅ Pass ❌ Fail ✅ Pass ✅ 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 ✅ Pass ✅ 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.

4 participants