UPSTREAM: usb: dwc3: gadget: always enable CSP
authorFelipe Balbi <felipe.balbi@linux.intel.com>
Thu, 10 Mar 2016 11:53:27 +0000 (13:53 +0200)
committerHuang, Tao <huangtao@rock-chips.com>
Tue, 16 Aug 2016 12:48:19 +0000 (20:48 +0800)
commitad17e491a83d57bdd9f9c972c49a81ce811e1c24
treeb0d58e4cc0f257bac9223019191e66864c541696
parent21cba80c7ead37d5c8c934353c43dfd2781bd268
UPSTREAM: usb: dwc3: gadget: always enable CSP

CSP bit of TRB Control is useful for protocols such
CDC EEM/ECM/NCM where we're transferring in blocks
of MTU-sized requests (usually MTU is 1500 bytes).

We know we will always have a short packet after two
(for HS) wMaxPacketSize packets and, usually, we
will have a long(-ish) queue of requests (for our
g_ether gadget, we have at least 10
requests).

Instead of always stopping the queue processing to
interrupt, giveback and restart, let's tell dwc3 to
interrupt but continue processing following request
if we have anything already pending in the queue.

This gave me a considerable improvement of 40% on my
test setup.

Change-Id: I02ba152fff9cacad4ffabb3c03a70b06774c09ee
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
(cherry picked from commit ca4d44ea2a91b922e1514f5ed77f6bcf3657fd67)
drivers/usb/dwc3/gadget.c