Linux bluetooth development
 help / color / mirror / Atom feed
From: Chris Lu <chris.lu@mediatek.com>
To: Marcel Holtmann <marcel@holtmann.org>,
	Johan Hedberg <johan.hedberg@gmail.com>,
	Luiz Von Dentz <luiz.dentz@gmail.com>
Cc: Hao Qin <hao.qin@mediatek.com>,
	Sean Wang <sean.wang@mediatek.com>,
	Will Lee <will-cy.Lee@mediatek.com>, SS Wu <ss.wu@mediatek.com>,
	linux-bluetooth <linux-bluetooth@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	linux-mediatek <linux-mediatek@lists.infradead.org>,
	Chris Lu <chris.lu@mediatek.com>
Subject: [PATCH] Bluetooth: btusb: Do not set BROKEN_ENHANCED_SETUP_SYNC_CONN for newer MediaTek chips
Date: Tue, 24 Nov 2026 10:23:18 +0800	[thread overview]
Message-ID: <20261124022318.663787-2-chris.lu@mediatek.com> (raw)
In-Reply-To: <20261124022318.663787-1-chris.lu@mediatek.com>

HCI_QUIRK_BROKEN_ENHANCED_SETUP_SYNC_CONN was set for every MediaTek
controller, which makes the host fall back to HCI_OP_SETUP_SYNC_CONN
for SCO connections. MT7921/MT7920 and the older MT7663/MT7668 need
this fallback, but the chips released after MT7921 are expected to
handle HCI_OP_ENHANCED_SETUP_SYNC_CONN properly. Note that the chip
model number does not follow the release order.

Set the quirk in btusb_mtk_setup() only when the chip ID read from the
controller is 0x7663, 0x7668 or 0x7961, so the behavior of these chips
is unchanged. MT7920 reports the same chip ID (0x7961) as MT7921, so it
keeps the quirk as well.

For MT7922 and MT7925, verified that with the quirk removed the host
uses HCI_OP_ENHANCED_SETUP_SYNC_CONN to set up SCO connections and no
problem was observed. The chips released after them are not expected to
need the quirk either.

Signed-off-by: Chris Lu <chris.lu@mediatek.com>
---
 drivers/bluetooth/btusb_main.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/bluetooth/btusb_main.c b/drivers/bluetooth/btusb_main.c
index 95398e2ca098..f0ced6e3192f 100644
--- a/drivers/bluetooth/btusb_main.c
+++ b/drivers/bluetooth/btusb_main.c
@@ -3205,6 +3205,12 @@ static int btusb_mtk_setup(struct hci_dev *hdev)
 		if (platform_is_ryzen() && is_direct_child_of_root_hub(data->udev))
 			set_bit(BTUSB_WAKEUP_BROKEN, &data->flags);
 		break;
+	case 0x7663:
+	case 0x7668:
+	case 0x7961:
+		/* SCO does not work with HCI_OP_ENHANCED_SETUP_SYNC_CONN */
+		hci_set_quirk(hdev, HCI_QUIRK_BROKEN_ENHANCED_SETUP_SYNC_CONN);
+		break;
 	}
 
 	return 0;
@@ -4621,7 +4627,6 @@ static int btusb_probe(struct usb_interface *intf,
 		hdev->reset = btmtk_reset_sync;
 		hdev->set_bdaddr = btmtk_set_bdaddr;
 		hdev->send = btusb_send_frame_mtk;
-		hci_set_quirk(hdev, HCI_QUIRK_BROKEN_ENHANCED_SETUP_SYNC_CONN);
 		hci_set_quirk(hdev, HCI_QUIRK_NON_PERSISTENT_SETUP);
 		data->recv_acl = btmtk_usb_recv_acl;
 		data->recv_event = btmtk_recv_event;
-- 
2.45.2


      reply	other threads:[~2026-11-24  2:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24  2:23 [PATCH] Bluetooth: btusb: Add USB ID 0e8d:e028 for MediaTek MT7928 Chris Lu
2026-11-24  2:23 ` Chris Lu [this message]

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=20261124022318.663787-2-chris.lu@mediatek.com \
    --to=chris.lu@mediatek.com \
    --cc=hao.qin@mediatek.com \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=sean.wang@mediatek.com \
    --cc=ss.wu@mediatek.com \
    --cc=will-cy.Lee@mediatek.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox