mirror of https://github.com/torvalds/linux.git
Bluetooth: btmtk: Fix wait_on_bit_timeout interruption during shutdown
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: d019930b00 ("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>
This commit is contained in:
parent
3ba486c5f3
commit
099799fa9b
|
|
@ -642,12 +642,7 @@ static int btmtk_usb_hci_wmt_sync(struct hci_dev *hdev,
|
||||||
* WMT command.
|
* WMT command.
|
||||||
*/
|
*/
|
||||||
err = wait_on_bit_timeout(&data->flags, BTMTK_TX_WAIT_VND_EVT,
|
err = wait_on_bit_timeout(&data->flags, BTMTK_TX_WAIT_VND_EVT,
|
||||||
TASK_INTERRUPTIBLE, HCI_INIT_TIMEOUT);
|
TASK_UNINTERRUPTIBLE, HCI_INIT_TIMEOUT);
|
||||||
if (err == -EINTR) {
|
|
||||||
bt_dev_err(hdev, "Execution of wmt command interrupted");
|
|
||||||
clear_bit(BTMTK_TX_WAIT_VND_EVT, &data->flags);
|
|
||||||
goto err_free_wc;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (err) {
|
if (err) {
|
||||||
bt_dev_err(hdev, "Execution of wmt command timed out");
|
bt_dev_err(hdev, "Execution of wmt command timed out");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue