Subject: Re: Belkin Bluetooth vs aue vs ubt
To: Terry Moore <tmm@mcci.com>
From: Stephen Borrill <netbsd@precedence.co.uk>
List: tech-kern
Date: 03/13/2007 13:23:06
On Mon, 12 Mar 2007, Terry Moore wrote:
> Your descriptors are a little confusing. The VID/PID don't match what I
> thought were the VID/PID that was problematic, 0x050D/0x0121.
That's right, I've not found anyone with that product to test yet, we've
only looked at other aue(4) devices.
> One of the difficult things about USB is that it really demands a
> globally-aware probe mechanism that can resolve multiple possible matches in
> favor of the "most specific". Windows and Mac OS X both have this. When
> selecting a driver, each match is given a score, and the match with the best
> score is used. (Windows only makes this decision the first time the device is
> seen, and then remembers a vid/pid/rev/{location|serialnum} string, which is
> used the next time the device appears. Mac OS X simply repeats the vote
> every enumeration.
>
> It's going to be hard to make USB enumeration work nicely if the system can
> only use a simple sequential probe-until-claimed paradigm.
As I understand it, we do rank them by specificity. UMATCH_VENDOR_PRODUCT
(as used by aue) is higher than UMATCH_IFACECLASS_IFACESUBCLASS_IFACEPROTO
as used by ubt.
/* Match codes. */
#define UMATCH_HIGHEST 15
/* First five codes is for a whole device. */
#define UMATCH_VENDOR_PRODUCT_REV 14
#define UMATCH_VENDOR_PRODUCT 13
#define UMATCH_VENDOR_DEVCLASS_DEVPROTO 12
#define UMATCH_DEVCLASS_DEVSUBCLASS_DEVPROTO 11
#define UMATCH_DEVCLASS_DEVSUBCLASS 10
/* Next six codes are for interfaces. */
#define UMATCH_VENDOR_PRODUCT_REV_CONF_IFACE 9
#define UMATCH_VENDOR_PRODUCT_CONF_IFACE 8
#define UMATCH_VENDOR_IFACESUBCLASS_IFACEPROTO 7
#define UMATCH_VENDOR_IFACESUBCLASS 6
#define UMATCH_IFACECLASS_IFACESUBCLASS_IFACEPROTO 5
#define UMATCH_IFACECLASS_IFACESUBCLASS 4
#define UMATCH_IFACECLASS 3
#define UMATCH_IFACECLASS_GENERIC 2
/* Generic driver */
#define UMATCH_GENERIC 1
/* No match */
#define UMATCH_NONE 0
--
Stephen