Skip to contentSkip to conversation

btusb: Avoid reset of ISOC endpoint alt settings to zero

PATCH Applied Kiran K 4 participants 4 messages Oct 3, 2022 – Oct 7, 2022 Bluetooth drivers

lore
Share & tools
lore

Kiran K

author
#0 lore raw

PATCH 1/1 btusb: Avoid reset of ISOC endpoint alt settings to zero

From: Chethan Tumkur Narayan <[email protected]>

In case of suspend/resume and HCI_RESET (BT On and Off), ISOC endpoint set to alt setting 0 when no SCO connection exists. This patch shall avoid resetting of ISOC endpoint to alt setting to 0.

---
 drivers/bluetooth/btusb.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/bluetooth/btusb.c +3 -2
index 271963805a38..ebfec6d8573f 100644
@@ -1981,10 +1981,11 @@ static void btusb_work(struct work_struct *work)
 		if (btusb_switch_alt_setting(hdev, new_alts) < 0)
 			bt_dev_err(hdev, "set USB alt:(%d) failed!", new_alts);
 	} else {
-		clear_bit(BTUSB_ISOC_RUNNING, &data->flags);
 		usb_kill_anchored_urbs(&data->isoc_anchor);
 
-		__set_isoc_interface(hdev, 0);
+		if (test_and_clear_bit(BTUSB_ISOC_RUNNING, &data->flags))
+			__set_isoc_interface(hdev, 0);
+
 		if (test_and_clear_bit(BTUSB_DID_ISO_RESUME, &data->flags))
 			usb_autopm_put_interface(data->isoc ? data->isoc : data->intf);
 	}
Signature · 1 line
2.17.1
#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=682688

---Test result---

Test Summary:

CheckPatch                    PASS      1.79 seconds
GitLint                       PASS      1.02 seconds
SubjectPrefix                 FAIL      0.86 seconds
BuildKernel                   PASS      44.01 seconds
BuildKernel32                 PASS      37.35 seconds
Incremental Build with patchesPASS      52.88 seconds
TestRunner: Setup             PASS      611.23 seconds
TestRunner: l2cap-tester      PASS      19.50 seconds
TestRunner: iso-tester        PASS      19.65 seconds
TestRunner: bnep-tester       PASS      7.79 seconds
TestRunner: mgmt-tester       PASS      119.75 seconds
TestRunner: rfcomm-tester     PASS      12.14 seconds
TestRunner: sco-tester        PASS      11.26 seconds
TestRunner: ioctl-tester      PASS      12.80 seconds
TestRunner: smp-tester        PASS      11.21 seconds
TestRunner: userchan-tester   PASS      7.94 seconds

Details
##############################
Test: SubjectPrefix - FAIL - 0.86 seconds
Check subject contains "Bluetooth" prefix
"Bluetooth: " is not specified in the subject

---
Regards,
Linux Bluetooth

#2 lore raw

Hi Kiran,

Quoted 37 lines · On Mon, Oct 3, 2022 at 1:27 AM <[email protected]> wrote:

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=682688

---Test result---

Test Summary:

CheckPatch                    PASS      1.79 seconds
GitLint                       PASS      1.02 seconds
SubjectPrefix                 FAIL      0.86 seconds
BuildKernel                   PASS      44.01 seconds
BuildKernel32                 PASS      37.35 seconds
Incremental Build with patchesPASS      52.88 seconds
TestRunner: Setup             PASS      611.23 seconds
TestRunner: l2cap-tester      PASS      19.50 seconds
TestRunner: iso-tester        PASS      19.65 seconds
TestRunner: bnep-tester       PASS      7.79 seconds
TestRunner: mgmt-tester       PASS      119.75 seconds
TestRunner: rfcomm-tester     PASS      12.14 seconds
TestRunner: sco-tester        PASS      11.26 seconds
TestRunner: ioctl-tester      PASS      12.80 seconds
TestRunner: smp-tester        PASS      11.21 seconds
TestRunner: userchan-tester   PASS      7.94 seconds

Details
##############################
Test: SubjectPrefix - FAIL - 0.86 seconds
Check subject contains "Bluetooth" prefix
"Bluetooth: " is not specified in the subject

Quoted 3 lines

---
Regards,
Linux Bluetooth

Should we add a Fixes: tag? Also is there any bug that shall be listed as Link:?

Signature · 1 line
Luiz Augusto von Dentz
#3 lore raw
In reply to Kiran K
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 10 lines · On Mon, 3 Oct 2022 12:18:36 +0530 you wrote:

From: Chethan Tumkur Narayan <[email protected]>

In case of suspend/resume and HCI_RESET (BT On and Off), ISOC endpoint set to alt setting 0 when no SCO connection exists. This patch shall avoid resetting of ISOC endpoint to alt setting to 0.

[...]

Here is the summary with links:
- [v1] btusb: Avoid reset of ISOC endpoint alt settings to zero

    https://git.kernel.org/bluetooth/bluetooth-next/c/ed9fc1335a21

You are awesome, thank you!

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