Add usb_endpoint_descriptor to be part of the struct usb_ep
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 11 lines · tlinder
Change
ep_choose()andusb_ep_enable()prototypes to use endpoint descriptor fromusb_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 <[email protected]>
...
include/linux/usb/gadget.h struct usb_ep_ops { · line 140
Quoted 13 lines
include/linux/usb/gadget.h +5
-0@@ -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