NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/46992: USB BlueTooth device on Apple MacBook Air 5,1 should be identified as ubt0
>Number: 46992
>Category: kern
>Synopsis: USB BlueTooth device on Apple MacBook Air 5,1 should be
>identified as ubt0
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Sep 20 15:30:00 +0000 2012
>Originator: Ryo ONODERA
>Release: NetBSD 6.99.11
>Organization:
>Environment:
System: NetBSD tellurium.elements.tetera.org 6.99.11 NetBSD 6.99.11 (NODKWEDGE)
#60: Thu Sep 20 23:50:48 JST 2012
root%tellurium.elements.tetera.org@localhost:/usr/obj/sys/arch/amd64/compile/NODKWEDGE
amd64
Architecture: x86_64
Machine: amd64
>Description:
USB BlueTooth device on MacBook Air 5,1 (mid 2012) should be identified as
ubt0 at uhub5.
But uaa->class in ubt_match function in sys/dev/usb/ubt.c is
0xff (UDCLASS_VENDOR) instead of correct 0xe0 (UDCLASS_WIRELESS).
My patches forces 0x821f identified as ubt.
% dmesg
(snip)
ugen0 at uhub5 port 3
ugen0: Apple Inc. Bluetooth USB Host Controller, rev 2.00/0.86, addr 7
(snip)
% sudo usbdevs -v|grep -i bluetooth
port 3 addr 7: full speed, self powered, config 1, Bluetooth USB Host
Controller(0x821f), Apple Inc.(0x05ac), rev 0.86
With the attached patches, 0x821f is identified as ubt0 and works fine
with BlueTooth mouse.
% dmesg
(snip)
ubt0 at uhub5 port 3
ubt0: Apple Inc. Bluetooth USB Host Controller, rev 2.00/0.86, addr 7
(snip)
>How-To-Repeat:
Boot NetBSD current on Apple MacBook Air (mid 2012).
>Fix:
Index: usbdevs
===================================================================
RCS file: /cvsroot/src/sys/dev/usb/usbdevs,v
retrieving revision 1.626
diff -u -r1.626 usbdevs
--- usbdevs 10 Aug 2012 02:39:32 -0000 1.626
+++ usbdevs 20 Sep 2012 15:15:16 -0000
@@ -831,6 +831,7 @@
product APPLE IPHONE_3GS 0x1294 iPhone 3GS
product APPLE IPAD 0x129a Apple iPad
product APPLE ETHERNET 0x1402 Apple USB to Ethernet
+product APPLE BLUETOOTH_HOST_C 0x821f Bluetooth USB Host Controller
/* ArkMicroChips products */
product ARKMICROCHIPS USBSERIAL 0x0232 USB-UART Controller
Index: ubt.c
===================================================================
RCS file: /cvsroot/src/sys/dev/usb/ubt.c,v
retrieving revision 1.48
diff -u -r1.48 ubt.c
--- ubt.c 2 Jun 2012 21:36:45 -0000 1.48
+++ ubt.c 20 Sep 2012 15:15:17 -0000
@@ -316,6 +316,16 @@
{ USB_VENDOR_BROADCOM, USB_PRODUCT_BROADCOM_BCM2033NF },
};
+/*
+ * Some device returns wrong class (UDCLASS_VENDOR).
+ * To force to detect, Add
+ * { VendorID, ProductID }
+ * to the ubt_force_detect list.
+ */
+static const struct usb_devno ubt_force_detect[] = {
+ { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_BLUETOOTH_HOST_C },
+};
+
int
ubt_match(device_t parent, cfdata_t match, void *aux)
{
@@ -331,6 +341,9 @@
&& uaa->proto == UDPROTO_BLUETOOTH)
return UMATCH_DEVCLASS_DEVSUBCLASS_DEVPROTO;
+ if (usb_lookup(ubt_force_detect, uaa->vendor, uaa->product))
+ return UMATCH_DEVCLASS_DEVSUBCLASS_DEVPROTO;
+
return UMATCH_NONE;
}
>Unformatted:
Home |
Main Index |
Thread Index |
Old Index