* [PATCH v2 resend 0/1] Bluetooth: btusb: Fix detection of some fake CSR controllers with a bcdDevice val of 0x0134
@ 2020-12-03 10:37 Hans de Goede
2020-12-03 10:37 ` [PATCH v2 resend] " Hans de Goede
0 siblings, 1 reply; 3+ messages in thread
From: Hans de Goede @ 2020-12-03 10:37 UTC (permalink / raw)
To: Marcel Holtmann, Johan Hedberg, Ismael Ferreras Morezuelas
Cc: Hans de Goede, linux-bluetooth
Hi Marcel,
Here is a resend of a fix for a regression introduced by
commit cde1a8a99287 ("Bluetooth: btusb: Fix and detect most of the
Chinese Bluetooth controllers"), which you have not picked up yet.
Since this fixes a regression it would be good if this can get
merged sooner rather then later. Can you please qeueu this up
for merging?
Note at first I send this out as patch 1 of a series of 2 patches
with fixes for fake CSR controllers. The 2nd patch is not a regression
fix and is somewhat more involved. So I've split this pure bug-fix
patch out as a standalone patch now, so that this can get merged ASAP.
Regards,
Hans
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2 resend] Bluetooth: btusb: Fix detection of some fake CSR controllers with a bcdDevice val of 0x0134
2020-12-03 10:37 [PATCH v2 resend 0/1] Bluetooth: btusb: Fix detection of some fake CSR controllers with a bcdDevice val of 0x0134 Hans de Goede
@ 2020-12-03 10:37 ` Hans de Goede
2020-12-03 11:04 ` [v2,resend] " bluez.test.bot
0 siblings, 1 reply; 3+ messages in thread
From: Hans de Goede @ 2020-12-03 10:37 UTC (permalink / raw)
To: Marcel Holtmann, Johan Hedberg, Ismael Ferreras Morezuelas
Cc: Hans de Goede, linux-bluetooth
Commit cde1a8a99287 ("Bluetooth: btusb: Fix and detect most of the
Chinese Bluetooth controllers") made the detection of fake controllers
more generic fixing it for much of the newer fakes / clones.
But this does not work for a fake CSR controller with a bcdDevice
value of 0x0134, which was correctly identified as fake before
this change.
Add an extra check for this special case, checking for a combination
of a bcdDevice value of 0x0134, together with a lmp_subver of 0x0c5c
and a hci_ver of BLUETOOTH_VER_2_0.
The chip inside this fake dongle is marked as with "clockwise cw6629d".
Fixes: cde1a8a99287 ("Bluetooth: btusb: Fix and detect most of the Chinese Bluetooth controllers")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
Changes in v2:
-Add description of chip inside the fake dongle to the commit message
---
drivers/bluetooth/btusb.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 1005b6e8ff74..ac7fede4f951 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -1763,6 +1763,8 @@ static int btusb_setup_bcm92035(struct hci_dev *hdev)
static int btusb_setup_csr(struct hci_dev *hdev)
{
+ struct btusb_data *data = hci_get_drvdata(hdev);
+ u16 bcdDevice = le16_to_cpu(data->udev->descriptor.bcdDevice);
struct hci_rp_read_local_version *rp;
struct sk_buff *skb;
bool is_fake = false;
@@ -1832,6 +1834,12 @@ static int btusb_setup_csr(struct hci_dev *hdev)
le16_to_cpu(rp->hci_ver) > BLUETOOTH_VER_4_0)
is_fake = true;
+ /* Other clones which beat all the above checks */
+ else if (bcdDevice == 0x0134 &&
+ le16_to_cpu(rp->lmp_subver) == 0x0c5c &&
+ le16_to_cpu(rp->hci_ver) == BLUETOOTH_VER_2_0)
+ is_fake = true;
+
if (is_fake) {
bt_dev_warn(hdev, "CSR: Unbranded CSR clone detected; adding workarounds...");
--
2.28.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [v2,resend] Bluetooth: btusb: Fix detection of some fake CSR controllers with a bcdDevice val of 0x0134
2020-12-03 10:37 ` [PATCH v2 resend] " Hans de Goede
@ 2020-12-03 11:04 ` bluez.test.bot
0 siblings, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2020-12-03 11:04 UTC (permalink / raw)
To: linux-bluetooth, hdegoede
[-- Attachment #1: Type: text/plain, Size: 879 bytes --]
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=395381
---Test result---
##############################
Test: CheckPatch - PASS
##############################
Test: CheckGitLint - FAIL
Output:
Bluetooth: btusb: Fix detection of some fake CSR controllers with a bcdDevice val of 0x0134
1: T1 Title exceeds max length (91>72): "Bluetooth: btusb: Fix detection of some fake CSR controllers with a bcdDevice val of 0x0134"
17: B1 Line exceeds max length (98>80): "Fixes: cde1a8a99287 ("Bluetooth: btusb: Fix and detect most of the Chinese Bluetooth controllers")"
##############################
Test: CheckBuildK - PASS
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-12-03 11:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-03 10:37 [PATCH v2 resend 0/1] Bluetooth: btusb: Fix detection of some fake CSR controllers with a bcdDevice val of 0x0134 Hans de Goede
2020-12-03 10:37 ` [PATCH v2 resend] " Hans de Goede
2020-12-03 11:04 ` [v2,resend] " bluez.test.bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).