Bug 264416 - [ubt] Not found on Apple MacBookPro11,4
Summary: [ubt] Not found on Apple MacBookPro11,4
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: usb (show other bugs)
Version: 13.1-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: Hans Petter Selasky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-02 15:04 UTC by huanghwh
Modified: 2022-06-14 09:41 UTC (History)
2 users (show)

See Also:


Attachments
dump_device_desc (2.55 KB, text/plain)
2022-06-02 22:30 UTC, huanghwh
no flags Details
dump_all_desc.txt (10.39 KB, text/plain)
2022-06-03 02:28 UTC, huanghwh
no flags Details
Patch to try. (3.28 KB, patch)
2022-06-03 08:24 UTC, Hans Petter Selasky
no flags Details | Diff
Patch to try. (3.93 KB, patch)
2022-06-03 08:34 UTC, Hans Petter Selasky
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description huanghwh 2022-06-02 15:04:37 UTC
I upload hardware to https://bsd-hardware.info/?probe=29f1ef0cdc&log=usbconfig
It is my assumption that this hardware should be supported by reading this comment in:
/usr/src/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c:

	/* Apple-specific (Broadcom) devices */
	{ USB_VENDOR(USB_VENDOR_APPLE),
	  USB_IFACE_CLASS(UICLASS_VENDOR),
	  USB_IFACE_SUBCLASS(UDSUBCLASS_RF),
	  USB_IFACE_PROTOCOL(UDPROTO_BLUETOOTH) },

but ubt driver is not attached.

btw: from https://bsd-hardware.info/?probe=64ccf1e6a0&log=usbconfig, ubt can be attached on Apple MacBookPro10,1.
Comment 1 Hans Petter Selasky freebsd_committer freebsd_triage 2022-06-02 15:07:11 UTC
Can you show the output from:

usbconfig dump_device_desc

On your computer?

--HPS
Comment 2 huanghwh 2022-06-02 22:30:14 UTC
Created attachment 234402 [details]
dump_device_desc

attached dump_device_desc
Comment 3 huanghwh 2022-06-03 02:28:29 UTC
Created attachment 234406 [details]
dump_all_desc.txt

On my desktop, Bluetooth interface is [2,3] not [0,1]
Comment 4 Hans Petter Selasky freebsd_committer freebsd_triage 2022-06-03 08:24:24 UTC
Created attachment 234412 [details]
Patch to try.

Does this patch fix the attach problem and make the device work?
Comment 5 Hans Petter Selasky freebsd_committer freebsd_triage 2022-06-03 08:34:56 UTC
Created attachment 234413 [details]
Patch to try.

Some minor fix.
Comment 6 huanghwh 2022-06-03 10:04:55 UTC
after patch, attached driver:

ubt0 on uhub0
ubt0: <Broadcom Corp. Bluetooth USB Host Controller, class 239/2, rev 2.01/1.53, addr 1> on usbus0


Thanks!
Comment 7 Hans Petter Selasky freebsd_committer freebsd_triage 2022-06-03 10:08:35 UTC
Does it work too?
Comment 8 commit-hook freebsd_committer freebsd_triage 2022-06-03 10:10:20 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=9d28e15e7bbee7a809eb4ccab558d114d4343312

commit 9d28e15e7bbee7a809eb4ccab558d114d4343312
Author:     Hans Petter Selasky <hselasky@FreeBSD.org>
AuthorDate: 2022-06-03 08:22:54 +0000
Commit:     Hans Petter Selasky <hselasky@FreeBSD.org>
CommitDate: 2022-06-03 08:49:17 +0000

    ng_ubt(4): Probe USB Bluetooth per USB interface and not per USB device.

    PR:             264416
    MFC after:      1 week
    Sponsored by:   NVIDIA Networking

 sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c | 67 +++++++++++++++++------------
 1 file changed, 40 insertions(+), 27 deletions(-)
Comment 9 commit-hook freebsd_committer freebsd_triage 2022-06-14 09:41:26 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=ac91cbc1f50078a9062243764c10a9b34fb39b59

commit ac91cbc1f50078a9062243764c10a9b34fb39b59
Author:     Hans Petter Selasky <hselasky@FreeBSD.org>
AuthorDate: 2022-06-03 08:22:54 +0000
Commit:     Hans Petter Selasky <hselasky@FreeBSD.org>
CommitDate: 2022-06-14 09:39:23 +0000

    ng_ubt(4): Probe USB Bluetooth per USB interface and not per USB device.

    PR:             264416
    Sponsored by:   NVIDIA Networking

    (cherry picked from commit 9d28e15e7bbee7a809eb4ccab558d114d4343312)

 sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c | 67 +++++++++++++++++------------
 1 file changed, 40 insertions(+), 27 deletions(-)