<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/drivers/usb/dwc3/gadget.c, branch standardize-docs</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=standardize-docs</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=standardize-docs'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2017-06-20T03:39:34+00:00</updated>
<entry>
<title>Merge tag 'usb-for-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-testing</title>
<updated>2017-06-20T03:39:34+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2017-06-20T03:39:34+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=24040a58379e2f2fa6aa9466911b758073b6bdfa'/>
<id>urn:sha1:24040a58379e2f2fa6aa9466911b758073b6bdfa</id>
<content type='text'>
Felipe writes:

usb: changes for v4.13 merge window

This time around we have a total of 57 non-merge commits. A list of
most important changes follows:

- Improvements to dwc3 tracing interface
- Initial dual-role support for dwc3
- Improvements to how we handle DMA resources in dwc3
- A new f_uac1 implementation which much more flexible
- Removal of AVR32 bits
- Improvements to f_mass_storage driver
</content>
</entry>
<entry>
<title>usb: dwc3: gadget: increase readability of dwc3_gadget_init_endpoints()</title>
<updated>2017-06-13T10:21:08+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2017-06-12T12:11:25+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=46b780d46bccdc75b63a98b2a9cca5a4e0ff2cec'/>
<id>urn:sha1:46b780d46bccdc75b63a98b2a9cca5a4e0ff2cec</id>
<content type='text'>
The commit 47d3946ea220

	usb: dwc3: refactor gadget endpoint count calculation

refactored dwc3_gadget_init_endpoints() and in particular changed in or
out endpoint numbering to be through. It's not always convenient and
makes code a slightly harder to read.

Introduce a new temporary variable to make it easier to understand what
is going on inside the function.

While doing that, rename local variables as follows:
	u8 num	-&gt; u8 total
	int num -&gt; int kbytes

Replace implicit direction check via epnum with explicit use of
direction variable.

While here, replace %d to %u when compounding endpoint name since we are
using unsigned type.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: dwc3: gadget: implement -&gt;udc_set_speed()</title>
<updated>2017-06-13T10:21:03+00:00</updated>
<author>
<name>Felipe Balbi</name>
<email>felipe.balbi@linux.intel.com</email>
</author>
<published>2017-06-06T13:05:23+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=7d8d0639565ff22d5fad419c2f2887213d7c2915'/>
<id>urn:sha1:7d8d0639565ff22d5fad419c2f2887213d7c2915</id>
<content type='text'>
Use this method to make sure we don't try to connect on speeds not
supported by the gadget driver.

Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: dwc3: gadget: slight cleanup to dwc3_process_event_entry()</title>
<updated>2017-06-02T08:22:28+00:00</updated>
<author>
<name>Felipe Balbi</name>
<email>felipe.balbi@linux.intel.com</email>
</author>
<published>2017-04-26T10:44:51+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=dfc5e80578f21552e7d5880ea7c0556b8b625895'/>
<id>urn:sha1:dfc5e80578f21552e7d5880ea7c0556b8b625895</id>
<content type='text'>
No functional changes, just a slight readability improvement.

Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: dwc3: update documentation</title>
<updated>2017-06-02T08:22:27+00:00</updated>
<author>
<name>Felipe Balbi</name>
<email>felipe.balbi@linux.intel.com</email>
</author>
<published>2017-04-19T11:59:27+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=bfad65ee9be2096a854e350ba6324e3e48ad5e1d'/>
<id>urn:sha1:bfad65ee9be2096a854e350ba6324e3e48ad5e1d</id>
<content type='text'>
No functional changes, just making sure we can use these for ReST docs
later.

Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: dwc3: replace %p with %pK</title>
<updated>2017-06-02T08:22:10+00:00</updated>
<author>
<name>Felipe Balbi</name>
<email>felipe.balbi@linux.intel.com</email>
</author>
<published>2017-05-17T12:57:45+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=04fb365c453e14ff9e8a28f1c46050d920a27a4a'/>
<id>urn:sha1:04fb365c453e14ff9e8a28f1c46050d920a27a4a</id>
<content type='text'>
%p will leak kernel pointers, so let's not expose the information on
dmesg and instead use %pK. %pK will only show the actual addresses if
explicitly enabled under /proc/sys/kernel/kptr_restrict.

Cc: &lt;stable@vger.kernel.org&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: dwc3: gadget: lazily map requests for DMA</title>
<updated>2017-05-17T10:21:14+00:00</updated>
<author>
<name>Felipe Balbi</name>
<email>felipe.balbi@linux.intel.com</email>
</author>
<published>2017-05-17T10:21:14+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=cdb55b39fab82b5d48c9a7aa0348268f07b993ed'/>
<id>urn:sha1:cdb55b39fab82b5d48c9a7aa0348268f07b993ed</id>
<content type='text'>
Some functions might want to have very, very long request queues. We
can't make any assumptions about how many requests we *are* able to
map, so instead of mapping requests early, let's map them late. This
way, functions can queue as many requests as they'd like but we won't
take DMA resources until they are needed.

Also, we can now stop processing requests when we run out of DMA
resources but still keep requests in the queue for late processing.

Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: dwc3: gadget: don't WARN about lack of TRBs</title>
<updated>2017-05-17T10:20:51+00:00</updated>
<author>
<name>Felipe Balbi</name>
<email>felipe.balbi@linux.intel.com</email>
</author>
<published>2017-05-17T10:19:06+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=202adafe5a6e68fea30982c57cf51489936487ef'/>
<id>urn:sha1:202adafe5a6e68fea30982c57cf51489936487ef</id>
<content type='text'>
We don't need a big fat warning with stack dump at all. Running out of
TRBs is a normal condition and we will have more TRBs available as
soon as some transfers complete.

Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: dwc3: gadget: Prevent losing events in event cache</title>
<updated>2017-05-16T11:11:03+00:00</updated>
<author>
<name>Thinh Nguyen</name>
<email>Thinh.Nguyen@synopsys.com</email>
</author>
<published>2017-05-12T00:26:47+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=d325a1de49d61ee11aca58a529571c91ecea7879'/>
<id>urn:sha1:d325a1de49d61ee11aca58a529571c91ecea7879</id>
<content type='text'>
The dwc3 driver can overwite its previous events if its top-half IRQ
handler (TH) gets invoked again before processing the events in the
cache. We see this as a hang in the file transfer and the host will
attempt to reset the device. TH gets the event count and deasserts the
interrupt line by writing DWC3_GEVNTSIZ_INTMASK to DWC3_GEVNTSIZ. If
there's a new event coming between reading the event count and interrupt
deassertion, dwc3 will lose previous pending events. More generally, we
will see 0 event count, which should not affect anything.

This shouldn't be possible in the current dwc3 implementation. However,
through testing and reading the PCIe trace, the TH occasionally still
gets invoked one more time after HW interrupt deassertion. (With PCIe
legacy interrupts, TH is called repeatedly as long as the interrupt line
is asserted). We suspect that there is a small detection delay in the
SW.

To avoid this issue, Check DWC3_EVENT_PENDING flag to determine if the
events are processed in the bottom-half IRQ handler. If not, return
IRQ_HANDLED and don't process new event.

Cc: stable@vger.kernel.org
Signed-off-by: Thinh Nguyen &lt;thinhn@synopsys.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: dwc3: gadget: Fix ISO transfer performance</title>
<updated>2017-05-16T11:11:03+00:00</updated>
<author>
<name>Roger Quadros</name>
<email>rogerq@ti.com</email>
</author>
<published>2017-04-21T12:58:08+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=f1d6826cae30e97e37a1f2481d7e1dc4faa09ce1'/>
<id>urn:sha1:f1d6826cae30e97e37a1f2481d7e1dc4faa09ce1</id>
<content type='text'>
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()")
Signed-off-by: Roger Quadros &lt;rogerq@ti.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
</feed>
