[PATCH v2 2/2] usb: dwc3: gadget: Report isoc scheduled frame number

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Report the scheduled frame number of an isochronous request.

Signed-off-by: Thinh Nguyen <thinhn@xxxxxxxxxxxx>
---
Change in v2:
 - Capture frame number at request cleanup

 drivers/usb/dwc3/gadget.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 679c12e14522..5e5e799699de 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -2345,6 +2345,10 @@ static int dwc3_gadget_ep_cleanup_completed_request(struct dwc3_ep *dep,
 
 	req->request.actual = req->request.length - req->remaining;
 
+	/* Report scheduled frame number for isoc transfers */
+	if (usb_endpoint_xfer_isoc(dep->endpoint.desc))
+		req->request.start_frame = dep->frame_number;
+
 	if (!dwc3_gadget_ep_request_completed(req) &&
 			req->num_pending_sgs) {
 		__dwc3_gadget_kick_transfer(dep);
-- 
2.11.0




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux