Re: [PATCHv2] usb: gadget: get rid of USB_GADGET_DUALSPEED andUSB_GADGET_SUPERSPEED

From: Alan Stern
Date: Thu Aug 18 2011 - 13:27:25 EST


On Thu, 18 Aug 2011, Michal Nazarewicz wrote:

> For the most part, usb_composite_probe() is called only once in module's
> init function. As far as I know, only g_ffs calls it several times. So
> in all cases expect for g_ffs, composite_driver.speed =
> min(composite_driver.speed,
> driver->max_speed) should have the same effect as composite_driver.speed
> = driver->max_speed.
>
> > For example, if you have a composite gadget where one of the function
> > drivers can handle SuperSpeed and the other can't go beyond high speed,
> > the overall gadget must never run faster than high speed.
>
> Shouldn't that be dealt in usb_add_function()? I cannot see any code that
> would do that here atm though.

Maybe you're right. But isn't that too late? The UDC driver has to
know the gadget driver's limitations before it can connect to the host.

Alan Stern

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