Commit 6b69753f authored by Thinh Nguyen's avatar Thinh Nguyen Committed by Felipe Balbi
Browse files

usb: gadget: Introduce frame_number to usb_request



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: default avatarThinh Nguyen <thinhn@synopsys.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent d54d334e
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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;
};