Skip to contentSkip to conversation

Bluetooth: btmtk: Remove the resetting step before downloading the fw

PATCH Applied Hao Qin 3 participants 3 messages Mar 15, 2025 – Mar 20, 2025

Subsystems (2)
lore
Share & tools
lore

Hao Qin

author
#0 lore raw

PATCH 1/1 Bluetooth: btmtk: Remove the resetting step before downloading the fw

Remove the resetting step before downloading the fw, as it may cause other usb devices to fail to initialise when connected during boot on kernels 6.11 and newer.

---
 drivers/bluetooth/btmtk.c | 10 ----------
 1 file changed, 10 deletions(-)
drivers/bluetooth/btmtk.c +0 -10
index 68846c5bd4f7..4390fd571dbd 100644
@@ -1330,13 +1330,6 @@ int btmtk_usb_setup(struct hci_dev *hdev)
 		break;
 	case 0x7922:
 	case 0x7925:
-		/* Reset the device to ensure it's in the initial state before
-		 * downloading the firmware to ensure.
-		 */
-
-		if (!test_bit(BTMTK_FIRMWARE_LOADED, &btmtk_data->flags))
-			btmtk_usb_subsys_reset(hdev, dev_id);
-		fallthrough;
 	case 0x7961:
 		btmtk_fw_get_filename(fw_bin_name, sizeof(fw_bin_name), dev_id,
 				      fw_version, fw_flavor);
@@ -1345,12 +1338,9 @@ int btmtk_usb_setup(struct hci_dev *hdev)
 						btmtk_usb_hci_wmt_sync);
 		if (err < 0) {
 			bt_dev_err(hdev, "Failed to set up firmware (%d)", err);
-			clear_bit(BTMTK_FIRMWARE_LOADED, &btmtk_data->flags);
 			return err;
 		}
 
-		set_bit(BTMTK_FIRMWARE_LOADED, &btmtk_data->flags);
-
 		/* It's Device EndPoint Reset Option Register */
 		err = btmtk_usb_uhw_reg_write(hdev, MTK_EP_RST_OPT,
 					      MTK_EP_RST_IN_OUT_OPT);
Signature · 1 line
2.18.0
#1 lore raw

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=944217

---Test result---

Test Summary:

CheckPatch                    PENDING   0.39 seconds
GitLint                       PENDING   0.27 seconds
SubjectPrefix                 PASS      0.05 seconds
BuildKernel                   PASS      24.47 seconds
CheckAllWarning               PASS      26.74 seconds
CheckSparse                   PASS      30.14 seconds
BuildKernel32                 PASS      24.12 seconds
TestRunnerSetup               PASS      431.97 seconds
TestRunner_l2cap-tester       PASS      23.11 seconds
TestRunner_iso-tester         PASS      37.09 seconds
TestRunner_bnep-tester        PASS      4.75 seconds
TestRunner_mgmt-tester        FAIL      123.66 seconds
TestRunner_rfcomm-tester      PASS      7.94 seconds
TestRunner_sco-tester         PASS      12.27 seconds
TestRunner_ioctl-tester       PASS      8.64 seconds
TestRunner_mesh-tester        FAIL      6.25 seconds
TestRunner_smp-tester         PASS      7.19 seconds
TestRunner_userchan-tester    PASS      5.01 seconds
IncrementalBuild              PENDING   0.86 seconds

Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:

##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:

##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner Output:
Total: 490, Passed: 485 (99.0%), Failed: 1, Not Run: 4

Failed Test Cases
LL Privacy - Set Flags 1 (Add to RL) Failed 0.164 seconds
##############################
Test: TestRunner_mesh-tester - FAIL
Desc: Run mesh-tester with test-runner
Output:

BUG: KASAN: slab-use-after-free in run_timer_softirq+0x76f/0x7d0
WARNING: CPU: 0 PID: 35 at kernel/workqueue.c:2257 __queue_work+0x687/0xb40

Total: 10, Passed: 9 (90.0%), Failed: 1, Not Run: 0

Failed Test Cases
Mesh - Send cancel - 1 Failed 0.110 seconds
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series Output:

---
Regards,
Linux Bluetooth

#2 lore raw
In reply to Hao Qin
This patch was applied to bluetooth/bluetooth-next.git (master) by Luiz Augusto von Dentz <[email protected]>:

Hello:

This patch was applied to bluetooth/bluetooth-next.git (master) by Luiz Augusto von Dentz <[email protected]>:

Quoted 8 lines · On Sat, 15 Mar 2025 10:27:30 +0800 you wrote:

Remove the resetting step before downloading the fw, as it may cause other usb devices to fail to initialise when connected during boot on kernels 6.11 and newer.

---
 drivers/bluetooth/btmtk.c | 10 ----------
 1 file changed, 10 deletions(-)

Here is the summary with links:
- Bluetooth: btmtk: Remove the resetting step before downloading the fw
https://git.kernel.org/bluetooth/bluetooth-next/c/aca3e8a5c46f

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html