All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zijun Hu <quic_zijuhu@quicinc.com>
To: <marcel@holtmann.org>, <johan.hedberg@gmail.com>,
	<luiz.dentz@gmail.com>, <luiz.von.dentz@intel.com>
Cc: <linux-kernel@vger.kernel.org>, <linux-bluetooth@vger.kernel.org>,
	<netdev@vger.kernel.org>, Zijun Hu <zijuhu@qti.qualcomm.com>
Subject: [PATCH v1] Bluetooth: btusb: Fix enable failure for a CSR BT dongle
Date: Thu, 27 Oct 2022 19:06:00 +0800	[thread overview]
Message-ID: <1666868760-4680-1-git-send-email-quic_zijuhu@quicinc.com> (raw)

From: Zijun Hu <zijuhu@qti.qualcomm.com>

A CSR BT dongle fails to be enabled bcz it is not detected as fake
rightly, fixed by correcting fake detection condition.

below btmon error log says HCI_QUIRK_BROKEN_FILTER_CLEAR_ALL is not set.

< HCI Command: Set Event Filter (0x03|0x0005) plen 1        #23 [hci0]
        Type: Clear All Filters (0x00)
> HCI Event: Command Complete (0x0e) plen 4                 #24 [hci0]
      Set Event Filter (0x03|0x0005) ncmd 1
        Status: Invalid HCI Command Parameters (0x12)

the quirk is not set bcz current fake detection does not mark the dongle
as fake with below version info.

< HCI Command: Read Local Version In.. (0x04|0x0001) plen 0  #1 [hci0]
> HCI Event: Command Complete (0x0e) plen 12                 #2 [hci0]
      Read Local Version Information (0x04|0x0001) ncmd 1
        Status: Success (0x00)
        HCI version: Bluetooth 4.0 (0x06) - Revision 12576 (0x3120)
        LMP version: Bluetooth 4.0 (0x06) - Subversion 8891 (0x22bb)
        Manufacturer: Cambridge Silicon Radio (10)

Link: https://bugzilla.kernel.org/show_bug.cgi?id=60824
Signed-off-by: Zijun Hu <zijuhu@qti.qualcomm.com>
---
 drivers/bluetooth/btusb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 420be2ee2acf..727469d073f9 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -2155,7 +2155,7 @@ static int btusb_setup_csr(struct hci_dev *hdev)
 		is_fake = true;
 
 	else if (le16_to_cpu(rp->lmp_subver) <= 0x22bb &&
-		 le16_to_cpu(rp->hci_ver) > BLUETOOTH_VER_4_0)
+		 le16_to_cpu(rp->hci_ver) >= BLUETOOTH_VER_4_0)
 		is_fake = true;
 
 	/* Other clones which beat all the above checks */
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project


             reply	other threads:[~2022-10-27 11:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-27 11:06 Zijun Hu [this message]
2022-10-27 11:18 ` [PATCH v1] Bluetooth: btusb: Fix enable failure for a CSR BT dongle Paul Menzel
2022-10-28  2:57   ` quic_zijuhu
2022-10-27 12:06 ` [v1] " bluez.test.bot
2022-11-18  3:52 ` bluez.test.bot
2022-11-18  4:34 ` bluez.test.bot
2022-11-18  5:29 ` bluez.test.bot
2022-11-18  6:37 ` bluez.test.bot
2022-11-18  7:29 ` bluez.test.bot
2022-11-18  8:35 ` bluez.test.bot
2022-11-18  9:33 ` bluez.test.bot
2022-11-19  3:55 ` bluez.test.bot
2022-11-19  5:02 ` bluez.test.bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1666868760-4680-1-git-send-email-quic_zijuhu@quicinc.com \
    --to=quic_zijuhu@quicinc.com \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=luiz.von.dentz@intel.com \
    --cc=marcel@holtmann.org \
    --cc=netdev@vger.kernel.org \
    --cc=zijuhu@qti.qualcomm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.