Skip to contentSkip to conversation

Patch "usb: dwc3: gadget: Fix ISO transfer performance" has been added to the 4.11-stable tree

PATCH [email protected] 1 participant 1 message Jun 18, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

usb: dwc3: gadget: Fix ISO transfer performance

to the 4.11-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
usb-dwc3-gadget-fix-iso-transfer-performance.patch
and it can be found in the queue-4.11 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From f1d6826cae30e97e37a1f2481d7e1dc4faa09ce1 Mon Sep 17 00:00:00 2001

From: Roger Quadros <[email protected]>
Date: Fri, 21 Apr 2017 15:58:08 +0300
Subject: usb: dwc3: gadget: Fix ISO transfer performance

From: Roger Quadros <[email protected]>

commit f1d6826cae30e97e37a1f2481d7e1dc4faa09ce1 upstream.

Commit 08a36b543803 ("usb: dwc3: gadget: simplify __dwc3_gadget_ep_queue()") caused a small change in the way ISO transfer is handled in the case when XferInProgress event happens on Isoc EP with an active transfer. This caused a performance degradation of 50%. e.g. using g_webcam on DUT and luvcview on host the video frame rate dropped from 16fps to 8fps @high-speed.

Make the ISO transfer handling equivalent to that prior to that commit to get back the original ISO performance numbers.

Fixes 08a36b543803 ("usb: dwc3: gadget: simplify __dwc3_gadget_ep_queue()")
---
 drivers/usb/dwc3/gadget.c |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
drivers/usb/dwc3/gadget.c +11 -1
@@ -1258,14 +1258,24 @@ static int __dwc3_gadget_ep_queue(struct
 				__dwc3_gadget_start_isoc(dwc, dep, cur_uf);
 				dep->flags &= ~DWC3_EP_PENDING_REQUEST;
 			}
+			return 0;
 		}
-		return 0;
+
+		if ((dep->flags & DWC3_EP_BUSY) &&
+		    !(dep->flags & DWC3_EP_MISSED_ISOC)) {
+			WARN_ON_ONCE(!dep->resource_index);
+			ret = __dwc3_gadget_kick_transfer(dep,
+							  dep->resource_index);
+		}
+
+		goto out;
 	}
 
 	if (!dwc3_calc_trbs_left(dep))
 		return 0;
 
 	ret = __dwc3_gadget_kick_transfer(dep, 0);
+out:
 	if (ret == -EBUSY)
 		ret = 0;
 

Patches currently in stable-queue which might be from [email protected] are

queue-4.11/usb-dwc3-gadget-fix-iso-transfer-performance.patch queue-4.11/mfd-omap-usb-tll-fix-inverted-bit-use-for-usb-tll-mode.patch