Skip to content

fix: improve BT_FW_KMD_Service readiness and firmware detection on RB4#414

Merged
bhargav0610 merged 2 commits intoqualcomm-linux:mainfrom
smuppand:Bluetooth-fix
Apr 21, 2026
Merged

fix: improve BT_FW_KMD_Service readiness and firmware detection on RB4#414
bhargav0610 merged 2 commits intoqualcomm-linux:mainfrom
smuppand:Bluetooth-fix

Conversation

@smuppand
Copy link
Copy Markdown
Contributor

@smuppand smuppand commented Apr 21, 2026

This fix #413 the BT_FW_KMD_Service behavior on RB4-class platforms by addressing early-boot Bluetooth readiness, expanding firmware filename detection, and fixing testcase result flow.

Changes included:

  • add reusable bt_wait_ready() in lib_bluetooth.sh to wait for bluetooth.service and HCI availability during early boot
  • extend btfwpresent() to detect additional Qualcomm Bluetooth firmware naming variants used on RB4-class targets, including hpbtfw*/hpnv* and related patterns
  • update BT_FW_KMD_Service/run.sh to wait for Bluetooth runtime readiness before evaluating service/HCI state
  • update firmware warning text to reflect the expanded filename patterns
  • fix final result handling so a missing adapter no longer overwrites earlier failures with SKIP

Why:

  • RB4 Bluetooth runtime may come up slightly later in boot, causing the testcase to run before bluetooth.service and hci0 are ready
  • RB4 firmware layouts use additional QCA naming patterns that were not covered by the previous firmware detection logic
  • the previous result flow could incorrectly emit SKIP after already recording real failuresThis update improves BT_FW_KMD_Service behavior on RB4-class platforms by addressing early-boot Bluetooth readiness, expanding firmware filename detection, and fixing testcase result flow.

Lava job for reference with these changes - https://lava.infra.foundries.io/scheduler/job/184610

Add a reusable bt_wait_ready() helper to wait for bluetooth.service and
HCI availability during early boot, reducing bring-up races on targets
where Bluetooth comes up shortly after userspace starts.

Also extend btfwpresent() to detect additional Qualcomm firmware naming
patterns used on RB4-class platforms, including hpbtfw*/hpnv* and
related variants, so firmware presence is reported correctly across
newer and legacy layouts.

Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
…_Service

Update BT_FW_KMD_Service to wait for Bluetooth runtime readiness through
the shared bt_wait_ready() helper before evaluating service/HCI state,
making the testcase more reliable on targets that bring up Bluetooth
slightly later in boot.

Also improve result handling so a missing adapter no longer overwrites
earlier failures with SKIP, and refresh the firmware warning text to
cover the expanded Qualcomm firmware filename patterns checked by
lib_bluetooth.sh.

Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
Copy link
Copy Markdown
Contributor

@bhargav0610 bhargav0610 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bhargav0610 bhargav0610 merged commit 3008fb3 into qualcomm-linux:main Apr 21, 2026
12 checks passed
@qcom-anilyada
Copy link
Copy Markdown
Contributor

Passed BT job on RB4 with above changes: https://lava.infra.foundries.io/scheduler/job/184629

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.

BT_FW_KMD_Service and BT_SCAN is failing for iq-8275-evk

3 participants