[Bug 217651] BCM20702B0 Bluetooth device in MacBook no longer working

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--- Comment #14 from johnbholland@xxxxxxxxxx ---
I believe I have identified the problem and a fix. Commit
c13380a55522bf14e54779a142487c224509db95 is the cause, found by bisecting and
testing. Without it (built from immediately prior commit) the problem goes
away. Also, in the current code, this change is there and the latest version
6.5.0-rc1 has the issue, and it can be fixed by reverting this change. The
change in question is:

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 5c536151ef83..4ca91c033d2f 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -3831,13 +3831,9 @@ static int btusb_probe(struct usb_interface *intf,

        BT_DBG("intf %p id %p", intf, id);

-       /* interface numbers are hardcoded in the spec */
-       if (intf->cur_altsetting->desc.bInterfaceNumber != 0) {
-               if (!(id->driver_info & BTUSB_IFNUM_2))
-                       return -ENODEV;
-               if (intf->cur_altsetting->desc.bInterfaceNumber != 2)
-                       return -ENODEV;
-       }
+       if ((id->driver_info & BTUSB_IFNUM_2) &&
+           (intf->cur_altsetting->desc.bInterfaceNumber != 2))
+               return -ENODEV;

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

( - is the code that works, + is the code that doesn't). 
Looking at the code, it looks like it was meant to remove the outer if
statement and turn the inner part into something simpler. I think it is missing
an ! and uses && instead of || if that is what it intends. 

When I changed it to that though, the problem still existed. So what worked for
me was to revert this block of code to the previous version, in both 6.3 and
6.5.  In 6.5 this file has changed a lot, but this block is the same as the
commit made it. 

My 2014 Macbook Pro is perhaps an obscure bit of hardware and I don't know
whether this change was fixing something on other hardware. On my Macbook,
though, it causes the internal Bluetooth controller to not be seen. 
I will also send an email to the people in the commit,
 Signed-off-by: Tomasz Moń <tomasz.mon@xxxxxxxxxxxxx>
    Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>

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

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



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux