diff mbox series

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

Message ID bug-217651-62941-RkBcMY1icy@https.bugzilla.kernel.org/ (mailing list archive)
State Superseded
Headers show
Series [Bug,217651] BCM20702B0 Bluetooth device in MacBook no longer working | expand

Checks

Context Check Description
tedd_an/pre-ci_am fail error: patch failed: drivers/bluetooth/btusb.c:4104 error: drivers/bluetooth/btusb.c: patch does not apply hint: Use 'git am --show-current-patch' to see the failed patch

Commit Message

bugzilla-daemon@kernel.org July 13, 2023, 5:45 a.m. UTC
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:

Comments

bluez.test.bot@gmail.com July 13, 2023, 6:17 a.m. UTC | #1
This is an automated email and please do not reply to this email.

Dear Submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
While preparing the CI tests, the patches you submitted couldn't be applied to the current HEAD of the repository.

----- Output -----

error: patch failed: drivers/bluetooth/btusb.c:4104
error: drivers/bluetooth/btusb.c: patch does not apply
hint: Use 'git am --show-current-patch' to see the failed patch

Please resolve the issue and submit the patches again.


---
Regards,
Linux Bluetooth
diff mbox series

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;