Re: [RFC/PATCH v2 1/3] Add usb_endpoint_descriptor to be part of the struct usb_ep

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

 



On Thu, 7 Oct 2010, tlinder wrote:

> Change ep_choose() and usb_ep_enable() prototypes to use endpoint
> descriptor from usb_ep. This optimization prevents the FDs from handling
> the endpoint chosen descriptor.
> This optimization is not full though. To fully exploit this change one
> needs to update all the UDCs as well since in the current implementation
> each of them saves the endpoint descriptor in it's internal (and extended)
> endpoint structure.
> This patch is a preparation for adding SuperSpeed support to the gadget
> framework.
> 
> Signed-off-by: Tatyana Linder <tlinder@xxxxxxxxxxxxxx>

...

> diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
> index d3ef42d..5e5198d 100644
> --- a/include/linux/usb/gadget.h
> +++ b/include/linux/usb/gadget.h
> @@ -133,18 +133,25 @@ struct usb_ep_ops {
>   *      the endpoint descriptor used to configure the endpoint.
>   * @driver_data:for use by the gadget driver.  all other fields are
>   *	read-only to gadget drivers.
> + * @bEndpointAddress: used to identify ep when finding descriptor that matches
> + *	connection speed
> + * @desc:endpoint descriptor.  this pointer set before endpoint is enabled and
> + *	remains valid until the endpoint is disabled; the data byte order
> + *	is little-endian (usb-standard).

The kerneldoc for @driver_data states that @bEndpointAddress and @desc 
are read-only for gadget drivers.  This contradicts the changes this 
patch makes to those drivers.

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