lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CABBYNZLGocaksAKCTso3zL-bAuSKaBurTtOFZx_rw=HiKMmqtA@mail.gmail.com>
Date: Tue, 16 Apr 2024 10:53:43 -0400
From: Luiz Augusto von Dentz <luiz.dentz@...il.com>
To: Hao Qin <hao.qin@...iatek.com>
Cc: Marcel Holtmann <marcel@...tmann.org>, Johan Hedberg <johan.hedberg@...il.com>, 
	Sean Wang <sean.wang@...iatek.com>, Deren Wu <deren.Wu@...iatek.com>, 
	Aaron Hou <aaron.hou@...iatek.com>, Chris Lu <chris.lu@...iatek.com>, 
	Steve Lee <steve.lee@...iatek.com>, linux-bluetooth <linux-bluetooth@...r.kernel.org>, 
	linux-kernel <linux-kernel@...r.kernel.org>, 
	linux-mediatek <linux-mediatek@...ts.infradead.org>
Subject: Re: [PATCH] Bluetooth: btusb: mediatek: Add usb reset for firmware
 setup failure

Hi,

On Fri, Apr 12, 2024 at 4:43 AM Hao Qin <hao.qin@...iatek.com> wrote:
>
> Add usb reset to recover BT device from a firmware setup failure,
> it will restore the device to its original state and attempt setup
> firmware again.
>
> Signed-off-by: Hao Qin <hao.qin@...iatek.com>
> ---
>  drivers/bluetooth/btusb.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
> index 4c0cc13adb47..c5aab361795e 100644
> --- a/drivers/bluetooth/btusb.c
> +++ b/drivers/bluetooth/btusb.c
> @@ -3160,6 +3160,9 @@ static int btusb_mtk_setup(struct hci_dev *hdev)
>                                                 btusb_mtk_hci_wmt_sync);
>                 if (err < 0) {
>                         bt_dev_err(hdev, "Failed to set up firmware (%d)", err);
> +                       btusb_stop_traffic(data);
> +                       usb_kill_anchored_urbs(&data->tx_anchor);
> +                       usb_queue_reset_device(data->intf);

What if this was already caused by a reset? Wouldn't that create a
loop resetting the device over and over again?

>                         return err;
>                 }
>
> --
> 2.18.0
>


-- 
Luiz Augusto von Dentz

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ