On Sat, Jan 19, 2008 at 09:25:57PM -0700, Grant Grundler wrote:
> Hi,
> I'm slightly confused by this declaration in drivers/usb/storage/usb.c:
> #define UNUSUAL_DEV(id_vendor, id_product, bcdDeviceMin, bcdDeviceMax, \
>                     vendorName, productName,useProtocol, useTransport, \
>                     initFunction, flags) \
> ...
> 
> and in unusual.h:
> UAL_DEV(  0x03eb, 0x2002, 0x0100, 0x0100,
>                 "ATMEL",
>                 "SND1 Storage",
>                 US_SC_DEVICE, US_PR_DEVICE, NULL,
>                 US_FL_IGNORE_RESIDUE),
> 
> So US_SC_DEVICE ("Sub Classes" per include/linux/usb_usual.h) is used as a 
> wild card for useProtocol and US_PR_DEVICE ("Protocols") is the wildcard for 
> useTransport?


No, they aren't wildcards.

The value means "use whatever the device presents".  It's not used as a
matching parameter.  Matching only happens on VID/PID and revision.

Also, the naming is goofy for a reason.  The USB spec calls the numbers
"SubClass" and "Protocol".  However, the way they are used, the SubClass
defines the protocol (i.e. language) the device uses; the "Protocol"
defines the transport (i.e. how messages are packed for exchange).

There is no USB-spec field named 'Transport'.

Matt

-- 
Matthew Dharm                              Home: [EMAIL PROTECTED] 
Maintainer, Linux USB Mass Storage Driver

You were using cheat codes too.  You guys suck.
                                        -- Greg to General Studebaker
User Friendly, 12/16/1997

Attachment: pgpAEZt1U8r7p.pgp
Description: PGP signature

Reply via email to