diff mbox series

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

Message ID 20221003064836.11414-1-kiran.k@intel.com
State New
Headers show
Series [v1] btusb: Avoid reset of ISOC endpoint alt settings to zero | expand

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

Luiz Augusto von Dentz Oct. 4, 2022, 6:43 p.m. UTC | #1
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 | #2
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);
 	}