Subject: Re: Belkin Bluetooth vs aue vs ubt
To: Stephen Borrill <netbsd@precedence.co.uk>
From: Terry Moore <tmm@mcci.com>
List: tech-kern
Date: 03/07/2007 17:54:50
Hi,
Bluetooth comm adapters (if that's what this is) were not defined by
the normal process. The USB board of directors simply assigned a
code. The device class spec isn't available through USB-IF either.
But you can get the list of class codes here:
http://www.usb.org/developers/defined_class
The CDC Ethernet subclass is defined by USB CDC 1.1. There's some
clarifying information in the WMC 1.0 spec. It's possible that
Broadcom is running Ethernet over the Bluetooth radio, in which case
the "Ethernet"ness isn't visible from the USB descriptors.
Hope this is helpful.
--Terry
At 10:14 PM 3/7/2007 +0000, Stephen Borrill wrote:
>On Wed, 7 Mar 2007, Jason Thorpe wrote:
>>On Mar 7, 2007, at 1:40 PM, Stephen Borrill wrote:
>>
>>>I've had a quick look at that and we don't define any other
>>>subclass or proto for UDCLASS_WIRELESS (though I guess they must
>>>be defined somewhere). As its 'other' match is Wireless Ethernet,
>>>the class is the same. This could do with testing on real hardware.
>>
>>Well, aue shouldn't be WIRELESS :-) It's Ethernet.
>
>I'm not sure what class that would actually be:
>
>http://www.usb.org/developers/defined_class
>
>Communications Devices probably.
>
>We can either make aue reject UDCLASS_WIRELESS or look for the
>correct class. The former would be sufficient in this case, but I
>think this whole issue has highlighted that we should perhaps check
>sanity check class throughout our product-specific drivers. Does
>anyone have a real aue they can test with?
>
>How about this?
>
>Index: if_aue.c
>===================================================================
>RCS file: /cvsroot/src/sys/dev/usb/if_aue.c,v
>retrieving revision 1.100
>diff -u -r1.100 if_aue.c
>--- if_aue.c 4 Mar 2007 06:02:47 -0000 1.100
>+++ if_aue.c 7 Mar 2007 21:58:47 -0000
>@@ -712,10 +712,16 @@
> USB_MATCH(aue)
> {
> USB_MATCH_START(aue, uaa);
>+ usb_device_descriptor_t *dd;
>
> if (uaa->iface != NULL)
> return (UMATCH_NONE);
>
>+ /* Sanity check device class */
>+ dd = usbd_get_device_descriptor(uaa->device);
>+ if (dd != NULL && dd->bDeviceClass == UDCLASS_WIRELESS)
>+ return (UMATCH_NONE);
>+
> return (aue_lookup(uaa->vendor, uaa->product) != NULL ?
> UMATCH_VENDOR_PRODUCT : UMATCH_NONE);
> }
>
>Or perhaps
>
>+ if (dd != NULL && dd->bDeviceClass != UDCLASS_COMM)
>
>Iain, should I skip this if dd->bDeviceClass == UDCLASS_IN_INTERFACE?
>
>--
>Stephen