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] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 25 Jun 2019 07:43:03 +0200
From:   Marcel Holtmann <marcel@...tmann.org>
To:     Daniel Drake <drake@...lessm.com>
Cc:     Jian-Hong Pan <jian-hong@...lessm.com>,
        Johan Hedberg <johan.hedberg@...il.com>,
        Linux Bluetooth mailing list 
        <linux-bluetooth@...r.kernel.org>,
        Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] Bluetooth: btrtl: HCI reset on close for Realtek BT
 chip

Hi Daniel,

>> Realtek RTL8822BE BT chip on ASUS X420FA cannot be turned on correctly
>> after on-off several times. Bluetooth daemon sets BT mode failed when
>> this issue happens.
> 
> You could also mention that scanning must be active while turning off
> for this bug to be hit.
> 
>> bluetoothd[1576]: Failed to set mode: Failed (0x03)
>> 
>> If BT is tunred off, then turned on again, it works correctly again.
> 
> Typo: turned
> 
>> According to the vendor driver, the HCI_QUIRK_RESET_ON_CLOSE flag is set
>> during probing. So, this patch makes Realtek's BT reset on close to fix
>> this issue.
> 
> Checked the vendor driver - I see what you are referring to, so the
> change seems correct.
> 
> #if HCI_VERSION_CODE >= KERNEL_VERSION(3, 7, 1)
>    if (!reset)
>        set_bit(HCI_QUIRK_RESET_ON_CLOSE, &hdev->quirks);
>    RTKBT_DBG("set_bit(HCI_QUIRK_RESET_ON_CLOSE, &hdev->quirks);");
> #endif
> 
> However I'm pretty sure this is not saying that kernel 3.7.0 did not
> need the reset. I think it just means that the flag did not exist
> before Linux-3.7.1, so they added the ifdef to add some level of
> compatibility with older kernel versions. I think you can remove
> "since kernel v3.7.1." from the comment.
> 
> After those changes you can add:
> 
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=203429
> Reviewed-by: Daniel Drake <drake@...lessm.com>

if someone wants to use HCI_Reset to ensure that all their connections and radio usage is reset, then they should do that via the hdev->shutdown handler. Look at btusb.c if you need an example.

This quirk is for hardware that can not use HCI_Reset on init which is Bluetooth 1.0b hardware.

Regards

Marcel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ