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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 14 Sep 2022 15:45:14 -0700
From:   Luiz Augusto von Dentz <luiz.dentz@...il.com>
To:     sean.wang@...iatek.com
Cc:     marcel@...tmann.org, johan.hedberg@...il.com,
        Soul.Huang@...iatek.com, YN.Chen@...iatek.com,
        Leon.Yen@...iatek.com, Eric-SY.Chang@...iatek.com,
        Deren.Wu@...iatek.com, km.lin@...iatek.com,
        robin.chiu@...iatek.com, Eddie.Chen@...iatek.com,
        ch.yeh@...iatek.com, posh.sun@...iatek.com, ted.huang@...iatek.com,
        Stella.Chang@...iatek.com, Tom.Chou@...iatek.com,
        steve.lee@...iatek.com, jsiuda@...gle.com, frankgor@...gle.com,
        abhishekpandit@...gle.com, michaelfsun@...gle.com,
        abhishekpandit@...omium.org, mcchou@...omium.org,
        shawnku@...gle.com, linux-bluetooth@...r.kernel.org,
        linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/4] Bluetooth: btusb: mediatek: reset the device as WMT failed

Hi Sean,

On Mon, Sep 12, 2022 at 3:18 PM <sean.wang@...iatek.com> wrote:
>
> From: Sean Wang <sean.wang@...iatek.com>
>
> Reset the BT device whenever the driver detected any WMT failure happened
> to recover such kind of system-level error as soon as possible.
>
> Signed-off-by: Sean Wang <sean.wang@...iatek.com>
> ---
>  drivers/bluetooth/btusb.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
> index 653f57a98233..dc86726c8271 100644
> --- a/drivers/bluetooth/btusb.c
> +++ b/drivers/bluetooth/btusb.c
> @@ -2576,6 +2576,10 @@ static int btusb_mtk_hci_wmt_sync(struct hci_dev *hdev,
>         data->evt_skb = NULL;
>  err_free_wc:
>         kfree(wc);
> +
> +       if (err < 0)
> +               btmtk_reset_sync(hdev);

Doesn't reset itself can fail?

>         return err;

It would probably be better to reset on error at the caller IMO, also
in case it fails during firmware upload does reset even work? Also it
would probably have been better to have its own file for vendor
specific commands like this and use btmtk_ prefix as well.

>  }
>
> --
> 2.25.1
>


-- 
Luiz Augusto von Dentz

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ