Re: Alt setting and driver load question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 20 Apr 2009, Sarah Sharp wrote:

> Say you have a USB device that wants to default to a new USB class that
> may or may not have a driver for it yet.  The USB device wants the newer
> behavior whenever possible, but it can also use an older class.
> 
> Would the device work on an older system if it used alt setting 0 for
> the new class, and alt setting 1 for the old class?  Will the USB core
> switch the USB device over to the second alt setting and load the
> old class driver?

The device should use altsetting 0 for the old class and altsetting 1 
for the new class.  That's because the kernel always installs 
altsetting 0 when a device is first configured, so a legacy kernel 
would still be able to work with the device.

The new class driver should be written so that it can bind to an
interface belonging to the old class and switch it to altsetting 1.

> Or is the device forced to define the old and new class driver endpoints
> in the same interface?

Then you'd face the problem of which class to advertise in the 
interface descriptor.

Another alternative is to use multiple configurations and have a udev 
rule to install the appropriate config.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux