• Ismael Ferreras Morezuelas's avatar
    Bluetooth: btusb: Fix CSR clones again by re-adding ERR_DATA_REPORTING quirk · 42d7731e
    Ismael Ferreras Morezuelas authored
    A patch series by a Qualcomm engineer essentially removed my
    quirk/workaround because they thought it was unnecessary.
    
    It wasn't, and it broke everything again:
    
    https://patchwork.kernel.org/project/netdevbpf/list/?series=661703&archive=both&state=*
    
    He argues that the quirk is not necessary because the code should check
    if the dongle says if it's supported or not. The problem is that for
    these Chinese CSR clones they say that it would work:
    
    = New Index: 00:00:00:00:00:00 (Primary,USB,hci0)
    = Open Index: 00:00:00:00:00:00
    < HCI Command: Read Local Version Information (0x04|0x0001) plen 0
    > HCI Event: Command Complete (0x0e) plen 12
    > [hci0] 11.276039
          Read Local Version Information (0x04|0x0001) ncmd 1
            Status: Success (0x00)
            HCI version: Bluetooth 5.0 (0x09) - Revision 2064 (0x0810)
            LMP version: Bluetooth 5.0 (0x09) - Subversion 8978 (0x2312)
            Manufacturer: Cambridge Silicon Radio (10)
    ...
    < HCI Command: Read Local Supported Features (0x04|0x0003) plen 0
    > HCI Event: Command Complete (0x0e) plen 68
    > [hci0] 11.668030
          Read Local Supported Commands (0x04|0x0002) ncmd 1
            Status: Success (0x00)
            Commands: 163 entries
              ...
              Read Default Erroneous Data Reporting (Octet 18 - Bit 2)
              Write Default Erroneous Data Reporting (Octet 18 - Bit 3)
              ...
    ...
    < HCI Command: Read Default Erroneous Data Reporting (0x03|0x005a) plen 0
    = Close Index: 00:1A:7D:DA:71:XX
    
    So bring it back wholesale.
    
    Fixes: 63b1a7dd ("Bluetooth: hci_sync: Remove HCI_QUIRK_BROKEN_ERR_DATA_REPORTING")
    Fixes: e168f690 ("Bluetooth: btusb: Remove HCI_QUIRK_BROKEN_ERR_DATA_REPORTING for fake CSR")
    Fixes: 766ae242 ("Bluetooth: hci_sync: Check LMP feature bit instead of quirk")
    Cc: stable@vger.kernel.org
    Cc: Zijun Hu <quic_zijuhu@quicinc.com>
    Cc: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
    Cc: Hans de Goede <hdegoede@redhat.com>
    Tested-by: default avatarIsmael Ferreras Morezuelas <swyterzone@gmail.com>
    Signed-off-by: default avatarIsmael Ferreras Morezuelas <swyterzone@gmail.com>
    Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
    Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
    42d7731e
hci_sync.c 160 KB