Skip to content

Commit f9c5cbd

Browse files
chethantnVudentz
authored andcommitted
btusb: Avoid reset of ISOC endpoint alt settings to zero
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 <[email protected]> Signed-off-by: Kiran K <[email protected]> Signed-off-by: Luiz Augusto von Dentz <[email protected]>
1 parent 15eb162 commit f9c5cbd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/bluetooth/btusb.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1981,10 +1981,11 @@ static void btusb_work(struct work_struct *work)
19811981
if (btusb_switch_alt_setting(hdev, new_alts) < 0)
19821982
bt_dev_err(hdev, "set USB alt:(%d) failed!", new_alts);
19831983
} else {
1984-
clear_bit(BTUSB_ISOC_RUNNING, &data->flags);
19851984
usb_kill_anchored_urbs(&data->isoc_anchor);
19861985

1987-
__set_isoc_interface(hdev, 0);
1986+
if (test_and_clear_bit(BTUSB_ISOC_RUNNING, &data->flags))
1987+
__set_isoc_interface(hdev, 0);
1988+
19881989
if (test_and_clear_bit(BTUSB_DID_ISO_RESUME, &data->flags))
19891990
usb_autopm_put_interface(data->isoc ? data->isoc : data->intf);
19901991
}

0 commit comments

Comments
 (0)