]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
usb: gadget: Introduce frame_number to usb_request
authorThinh Nguyen <thinh.nguyen@synopsys.com>
Fri, 16 Nov 2018 03:03:21 +0000 (19:03 -0800)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Wed, 5 Dec 2018 09:14:11 +0000 (11:14 +0200)
Add a field frame_number to the usb_request to report the interval
number in (micro)frames in which the isochronous transfer was
transmitted or received. The gadget driver can use this knowledge to
synchronize with the host. Also, this option is useful for debugging
purposes.

Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
include/linux/usb/gadget.h

index e5cd84a0f84ad78a41da7d406884c33886f09d07..7595056b96c1e197dc5bfd019874c9b81415c85f 100644 (file)
@@ -61,6 +61,8 @@ struct usb_ep;
  *     invalidated by the error may first be dequeued.
  * @context: For use by the completion callback
  * @list: For use by the gadget driver.
+ * @frame_number: Reports the interval number in (micro)frame in which the
+ *     isochronous transfer was transmitted or received.
  * @status: Reports completion code, zero or a negative errno.
  *     Normally, faults block the transfer queue from advancing until
  *     the completion callback returns.
@@ -112,6 +114,8 @@ struct usb_request {
        void                    *context;
        struct list_head        list;
 
+       unsigned                frame_number;           /* ISO ONLY */
+
        int                     status;
        unsigned                actual;
 };