diff mbox series

[v2,1/2] usb: gadget: Add start_frame to usb_request

Message ID 58c23ee62fabb5753ce9ea7fc1e93743a5b7781c.1541645048.git.thinhn@synopsys.com (mailing list archive)
State New, archived
Headers show
Series [v2,1/2] usb: gadget: Add start_frame to usb_request | expand

Commit Message

Thinh Nguyen Nov. 8, 2018, 2:47 a.m. UTC
Similar to URB's start_frame, add a field start_frame to the usb_request
to report the scheduled (micro)frame number of an isochronous transfer.
This option is useful for debugging purposes.

Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
---
Change in v2:
 - None

 include/linux/usb/gadget.h | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
index e5cd84a0f84a..ed9dbbce55ee 100644
--- a/include/linux/usb/gadget.h
+++ b/include/linux/usb/gadget.h
@@ -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.
@@ -107,6 +108,8 @@  struct usb_request {
 	unsigned		short_not_ok:1;
 	unsigned		dma_mapped:1;
 
+	int			start_frame;		/* ISO ONLY */
+
 	void			(*complete)(struct usb_ep *ep,
 					struct usb_request *req);
 	void			*context;