linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: bugzilla-daemon@kernel.org
To: linux-bluetooth@vger.kernel.org
Subject: [Bug 217651] BCM20702B0  Bluetooth device in MacBook no longer working
Date: Thu, 13 Jul 2023 05:45:28 +0000	[thread overview]
Message-ID: <bug-217651-62941-RkBcMY1icy@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-217651-62941@https.bugzilla.kernel.org/>

https://bugzilla.kernel.org/show_bug.cgi?id=217651

--- Comment #17 from Tomasz Moń (desowin@gmail.com) ---
I think I understand the issue now, but the lsusb output would confirm it.
Before my patch, the driver would allow both interface 0 and 2, after it only
interface 2 is allowed for devices with BTUSB_IFNUM_2 flag set.

I see two potential solutions:
  1. Remove the check completely
  2. Change the if condition to allow both interface 0 and 2.

For the second solution, please try following patch:

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 5ec4ad0a5c86..46844194f54e 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -4104,7 +4104,8 @@ static int btusb_probe(struct usb_interface *intf,
        BT_DBG("intf %p id %p", intf, id);

        if ((id->driver_info & BTUSB_IFNUM_2) &&
-           (intf->cur_altsetting->desc.bInterfaceNumber != 2))
+           ((intf->cur_altsetting->desc.bInterfaceNumber != 0) ||
+            (intf->cur_altsetting->desc.bInterfaceNumber != 2))
                return -ENODEV;

        ifnum_base = intf->cur_altsetting->desc.bInterfaceNumber;

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.

  parent reply	other threads:[~2023-07-13  5:45 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-09 22:56 [Bug 217651] New: BCM20702B0 Bluetooth device in MacBook no longer working bugzilla-daemon
2023-07-09 22:57 ` [Bug 217651] " bugzilla-daemon
2023-07-10  3:33 ` bugzilla-daemon
2023-07-10 12:08 ` bugzilla-daemon
2023-07-10 12:09 ` bugzilla-daemon
2023-07-10 12:09 ` bugzilla-daemon
2023-07-10 12:10 ` bugzilla-daemon
2023-07-10 12:11 ` bugzilla-daemon
2023-07-10 12:13 ` bugzilla-daemon
2023-07-10 12:14 ` bugzilla-daemon
2023-07-10 18:50 ` bugzilla-daemon
2023-07-11  1:18 ` bugzilla-daemon
2023-07-11 14:37 ` bugzilla-daemon
2023-07-11 16:13 ` bugzilla-daemon
2023-07-12 22:59 ` bugzilla-daemon
2023-07-12 23:13   ` [Bug,217651] " bluez.test.bot
2023-07-13  4:18 ` [Bug 217651] " bugzilla-daemon
2023-07-13  5:36 ` bugzilla-daemon
2023-07-13  5:45 ` bugzilla-daemon [this message]
2023-07-13  6:17   ` [Bug,217651] " bluez.test.bot
2023-07-13  5:58 ` [Bug 217651] " bugzilla-daemon
2023-07-13 11:31 ` bugzilla-daemon
2023-07-13 11:46 ` bugzilla-daemon
2023-07-13 11:54 ` bugzilla-daemon
2023-07-13 12:24   ` [Bug,217651] " bluez.test.bot
2023-08-28 20:34 ` [Bug 217651] " bugzilla-daemon

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=bug-217651-62941-RkBcMY1icy@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@kernel.org \
    --cc=linux-bluetooth@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).