Message ID | 20230713102514.699277-1-tomasz.mon@nordicsemi.no (mailing list archive) |
---|---|
State | Accepted |
Commit | f0408f0a1998df76b64e76a05fd7ca00f266e654 |
Headers | show |
Series | [RFC] Bluetooth: btusb: Fix bluetooth on Intel Macbook 2014 | expand |
Context | Check | Description |
---|---|---|
tedd_an/pre-ci_am | success | Success |
tedd_an/CheckPatch | success | CheckPatch PASS |
tedd_an/GitLint | success | Gitlint PASS |
tedd_an/SubjectPrefix | success | Gitlint PASS |
tedd_an/BuildKernel | success | BuildKernel PASS |
tedd_an/CheckAllWarning | success | CheckAllWarning PASS |
tedd_an/CheckSparse | success | CheckSparse PASS |
tedd_an/CheckSmatch | success | CheckSparse PASS |
tedd_an/BuildKernel32 | success | BuildKernel32 PASS |
tedd_an/TestRunnerSetup | success | TestRunnerSetup PASS |
tedd_an/TestRunner_l2cap-tester | success | TestRunner PASS |
tedd_an/TestRunner_iso-tester | success | TestRunner PASS |
tedd_an/TestRunner_bnep-tester | success | TestRunner PASS |
tedd_an/TestRunner_mgmt-tester | success | TestRunner PASS |
tedd_an/TestRunner_rfcomm-tester | success | TestRunner PASS |
tedd_an/TestRunner_sco-tester | success | TestRunner PASS |
tedd_an/TestRunner_ioctl-tester | success | TestRunner PASS |
tedd_an/TestRunner_mesh-tester | success | TestRunner PASS |
tedd_an/TestRunner_smp-tester | success | TestRunner PASS |
tedd_an/TestRunner_userchan-tester | success | TestRunner PASS |
tedd_an/IncrementalBuild | success | Incremental Build PASS |
This is automated email and please do not reply to this email! Dear submitter, Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series: PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=765251 ---Test result--- Test Summary: CheckPatch PASS 0.56 seconds GitLint PASS 0.24 seconds SubjectPrefix PASS 0.07 seconds BuildKernel PASS 33.17 seconds CheckAllWarning PASS 36.45 seconds CheckSparse PASS 42.01 seconds CheckSmatch PASS 112.99 seconds BuildKernel32 PASS 32.31 seconds TestRunnerSetup PASS 490.59 seconds TestRunner_l2cap-tester PASS 23.36 seconds TestRunner_iso-tester PASS 42.54 seconds TestRunner_bnep-tester PASS 10.79 seconds TestRunner_mgmt-tester PASS 219.78 seconds TestRunner_rfcomm-tester PASS 15.99 seconds TestRunner_sco-tester PASS 17.07 seconds TestRunner_ioctl-tester PASS 18.41 seconds TestRunner_mesh-tester PASS 13.44 seconds TestRunner_smp-tester PASS 14.46 seconds TestRunner_userchan-tester PASS 11.18 seconds IncrementalBuild PASS 30.40 seconds --- Regards, Linux Bluetooth
> Commit c13380a55522 ("Bluetooth: btusb: Do not require hardcoded > interface numbers") inadvertedly broke bluetooth on Intel Macbook 2014. > The intention was to keep behavior intact when BTUSB_IFNUM_2 is set and > otherwise allow any interface numbers. The problem is that the new logic > condition omits the case where bInterfaceNumber is 0. > > Fix BTUSB_IFNUM_2 handling by allowing both interface number 0 and 2 > when the flag is set. > > Fixes: c13380a55522 ("Bluetooth: btusb: Do not require hardcoded interface numbers") > Reported-by: John Holland <johnbholland@icloud.com> > Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217651 > Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no> > --- > drivers/bluetooth/btusb.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c > index d844fb8e7cb7..ab7d62538b48 100644 > --- a/drivers/bluetooth/btusb.c > +++ b/drivers/bluetooth/btusb.c > @@ -4258,6 +4258,7 @@ 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 != 0) && > (intf->cur_altsetting->desc.bInterfaceNumber != 2)) > return -ENODEV; > Tested-by: John Holland<johnbholland@icloud.com>
Hello: This patch was applied to bluetooth/bluetooth-next.git (master) by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>: On Thu, 13 Jul 2023 12:25:14 +0200 you wrote: > Commit c13380a55522 ("Bluetooth: btusb: Do not require hardcoded > interface numbers") inadvertedly broke bluetooth on Intel Macbook 2014. > The intention was to keep behavior intact when BTUSB_IFNUM_2 is set and > otherwise allow any interface numbers. The problem is that the new logic > condition omits the case where bInterfaceNumber is 0. > > Fix BTUSB_IFNUM_2 handling by allowing both interface number 0 and 2 > when the flag is set. > > [...] Here is the summary with links: - [RFC] Bluetooth: btusb: Fix bluetooth on Intel Macbook 2014 https://git.kernel.org/bluetooth/bluetooth-next/c/f0408f0a1998 You are awesome, thank you!
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index d844fb8e7cb7..ab7d62538b48 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -4258,6 +4258,7 @@ 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 != 0) && (intf->cur_altsetting->desc.bInterfaceNumber != 2)) return -ENODEV;
Commit c13380a55522 ("Bluetooth: btusb: Do not require hardcoded interface numbers") inadvertedly broke bluetooth on Intel Macbook 2014. The intention was to keep behavior intact when BTUSB_IFNUM_2 is set and otherwise allow any interface numbers. The problem is that the new logic condition omits the case where bInterfaceNumber is 0. Fix BTUSB_IFNUM_2 handling by allowing both interface number 0 and 2 when the flag is set. Fixes: c13380a55522 ("Bluetooth: btusb: Do not require hardcoded interface numbers") Reported-by: John Holland <johnbholland@icloud.com> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217651 Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no> --- drivers/bluetooth/btusb.c | 1 + 1 file changed, 1 insertion(+)