diff mbox series

[v1] btusb: Avoid reset of ISOC endpoint alt settings to zero

Message ID 20221003064836.11414-1-kiran.k@intel.com (mailing list archive)
State Accepted
Commit ed9fc1335a2147c03ae96ff2f57e85947e89fc7e
Headers show
Series [v1] btusb: Avoid reset of ISOC endpoint alt settings to zero | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/checkpatch success Checkpatch PASS
tedd_an/gitlint success Gitlint PASS
tedd_an/subjectprefix fail "Bluetooth: " is not specified in the subject
tedd_an/buildkernel success Build Kernel PASS
tedd_an/buildkernel32 success Build Kernel32 PASS
tedd_an/incremental_build success Pass
tedd_an/testrunnersetup success Test Runner Setup PASS
tedd_an/testrunnerl2cap-tester success Total: 40, Passed: 40 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunneriso-tester success Total: 55, Passed: 55 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnerbnep-tester success Total: 1, Passed: 1 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnermgmt-tester success Total: 494, Passed: 494 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnerrfcomm-tester success Total: 11, Passed: 11 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnersco-tester success Total: 12, Passed: 12 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnerioctl-tester success Total: 28, Passed: 28 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnersmp-tester success Total: 8, Passed: 8 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunneruserchan-tester success Total: 4, Passed: 4 (100.0%), Failed: 0, Not Run: 0

Commit Message

K, Kiran Oct. 3, 2022, 6:48 a.m. UTC
From: Chethan Tumkur Narayan <chethan.tumkur.narayan@intel.com>

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.

Signed-off-by: Chethan Tumkur Narayan <chethan.tumkur.narayan@intel.com>
Signed-off-by: Kiran K <kiran.k@intel.com>
---
 drivers/bluetooth/btusb.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

bluez.test.bot@gmail.com Oct. 3, 2022, 7:32 a.m. UTC | #1
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
Luiz Augusto von Dentz Oct. 4, 2022, 6:43 p.m. UTC | #2
Hi Kiran,

On Mon, Oct 3, 2022 at 1:27 AM <bluez.test.bot@gmail.com> 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
>
>
>
> ---
> Regards,
> Linux Bluetooth

Should we add a Fixes: tag? Also is there any bug that shall be listed as Link:?
patchwork-bot+bluetooth@kernel.org Oct. 7, 2022, 7:40 p.m. UTC | #3
Hello:

This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Mon,  3 Oct 2022 12:18:36 +0530 you wrote:
> From: Chethan Tumkur Narayan <chethan.tumkur.narayan@intel.com>
> 
> 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.
> 
> Signed-off-by: Chethan Tumkur Narayan <chethan.tumkur.narayan@intel.com>
> Signed-off-by: Kiran K <kiran.k@intel.com>
> 
> [...]

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!
diff mbox series

Patch

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 271963805a38..ebfec6d8573f 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -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);
 	}