Skip to content

Commit 2b979ef

Browse files
Jiande Lugregkh
authored andcommitted
Bluetooth: btmtk: Fix wait_on_bit_timeout interruption during shutdown
[ Upstream commit 099799f ] During the shutdown process, an interrupt occurs that prematurely terminates the wait for the expected event. This change replaces TASK_INTERRUPTIBLE with TASK_UNINTERRUPTIBLE in the wait_on_bit_timeout call to ensure the shutdown process completes as intended without being interrupted by signals. Fixes: d019930 ("Bluetooth: btmtk: move btusb_mtk_hci_wmt_sync to btmtk.c") Signed-off-by: Jiande Lu <jiande.lu@mediatek.com> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 921a470 commit 2b979ef

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

drivers/bluetooth/btmtk.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -642,12 +642,7 @@ static int btmtk_usb_hci_wmt_sync(struct hci_dev *hdev,
642642
* WMT command.
643643
*/
644644
err = wait_on_bit_timeout(&data->flags, BTMTK_TX_WAIT_VND_EVT,
645-
TASK_INTERRUPTIBLE, HCI_INIT_TIMEOUT);
646-
if (err == -EINTR) {
647-
bt_dev_err(hdev, "Execution of wmt command interrupted");
648-
clear_bit(BTMTK_TX_WAIT_VND_EVT, &data->flags);
649-
goto err_free_wc;
650-
}
645+
TASK_UNINTERRUPTIBLE, HCI_INIT_TIMEOUT);
651646

652647
if (err) {
653648
bt_dev_err(hdev, "Execution of wmt command timed out");

0 commit comments

Comments
 (0)