usb: gadget: Add start_frame to usb_request
PATCH 1/2 usb: gadget: Add start_frame to usb_request
Hi,
Quoted 22 lines · Thinh Nguyen
Similar to URB's
start_frame, add a fieldstart_frameto theusb_requestto report the scheduled (micro)frame number of an isochronous transfer. This option is useful for debugging purposes.Signed-off-by Thinh Nguyen <[email protected]>--- include/linux/usb/gadget.h | 3 +++ 1 file changed, 3 insertions(+)include/linux/usb/gadget.h +1
-0@@ -50,6 +50,7 @@ struct usb_ep;* @short_not_ok: When reading data, makes short packets be * treated as errors (queue stops advancing till cleanup). * @dma_mapped: Indicates if request has been mapped to DMA (internal) +* @start_frame: the reported (micro)frame of the scheduled isoc transfer * @complete: Function called when request completes, so this request and * its buffer may be re-used. The function will always be called with * interrupts disabled, and it must not sleep.
include/linux/usb/gadget.h struct usb_request { · line 111
Quoted 4 lines
include/linux/usb/gadget.h +1
-0@@ -107,6 +108,8 @@ struct usb_request { unsigned short_not_ok:1; unsigned dma_mapped:1; +int start_frame;/* ISO ONLY */
this name is a bit misleading. I can see functions trying to use it to request that a particular request start on a specific frame. Would "started_frame" be a better name, perhaps?