<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/usb/dwc3, branch v4.11.5</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.11.5</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.11.5'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2017-05-25T13:46:19+00:00</updated>
<entry>
<title>usb: dwc3: gadget: Prevent losing events in event cache</title>
<updated>2017-05-25T13:46:19+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='https://git.radix-linux.su/kernel/linux.git/commit/?id=33c19ef5e24a2fa281e13af657c5714bc8da6f17'/>
<id>urn:sha1:33c19ef5e24a2fa281e13af657c5714bc8da6f17</id>
<content type='text'>
commit d325a1de49d61ee11aca58a529571c91ecea7879 upstream.

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.

Signed-off-by: Thinh Nguyen &lt;thinhn@synopsys.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: dwc3: gadget: delay unmap of bounced requests</title>
<updated>2017-03-22T09:20:36+00:00</updated>
<author>
<name>Janusz Dziedzic</name>
<email>januszx.dziedzic@intel.com</email>
</author>
<published>2017-03-13T12:11:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=de288e36fe33f7e06fa272bc8e2f85aa386d99aa'/>
<id>urn:sha1:de288e36fe33f7e06fa272bc8e2f85aa386d99aa</id>
<content type='text'>
In the case of bounced ep0 requests, we must delay DMA operation until
after -&gt;complete() otherwise we might overwrite contents of req-&gt;buf.

This caused problems with RNDIS gadget.

Signed-off-by: Janusz Dziedzic &lt;januszx.dziedzic@intel.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: dwc3: gadget: make to increment req-&gt;remaining in all cases</title>
<updated>2017-03-08T11:56:37+00:00</updated>
<author>
<name>Felipe Balbi</name>
<email>felipe.balbi@linux.intel.com</email>
</author>
<published>2017-03-08T11:56:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=35b2719e72d375f3e32c819858165668d948d5f2'/>
<id>urn:sha1:35b2719e72d375f3e32c819858165668d948d5f2</id>
<content type='text'>
Sometimes, we might get a completion for a TRB which is left with HWO
bit. Even in these cases, we should increment req-&gt;remaining to
properly report total transferred size. I noticed this while debuggin
a separate problem seen with MSC tests from USBCV. Sometimes we would
erroneously report a completion for a 512-byte transfer when, in
reality, we transferred 0 bytes.

Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: dwc3-omap: Fix missing break in dwc3_omap_set_mailbox()</title>
<updated>2017-03-06T14:59:34+00:00</updated>
<author>
<name>Roger Quadros</name>
<email>rogerq@ti.com</email>
</author>
<published>2017-02-15T11:38:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0913750f9fb6f26bcd00c8f9dd9a8d1b8d031246'/>
<id>urn:sha1:0913750f9fb6f26bcd00c8f9dd9a8d1b8d031246</id>
<content type='text'>
We need to break from all cases if we want to treat
each one of them separately.

Reported-by: Gustavo A. R. Silva &lt;garsilva@embeddedor.com&gt;
Fixes: d2728fb3e01f ("usb: dwc3: omap: Pass VBUS and ID events transparently")
Cc: &lt;stable@vger.kernel.org&gt; #v4.8+
Signed-off-by: Roger Quadros &lt;rogerq@ti.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: dwc3: gadget: Fix system suspend/resume on TI platforms</title>
<updated>2017-03-06T14:56:08+00:00</updated>
<author>
<name>Roger Quadros</name>
<email>rogerq@ti.com</email>
</author>
<published>2017-02-15T12:16:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1551e35ea4189c1f7199fe278395fc94196715f2'/>
<id>urn:sha1:1551e35ea4189c1f7199fe278395fc94196715f2</id>
<content type='text'>
On TI platforms (dra7, am437x), the DWC3_DSTS_DEVCTRLHLT bit is not set
after the device controller is stopped via DWC3_DCTL_RUN_STOP.

If we don't disconnect and stop the gadget, it stops working after a
system resume with the trace below.

There is no point in preventing gadget disconnect and gadget stop during
system suspend/resume as we're going to suspend in any case, whether
DEVCTRLHLT timed out or not.

[  141.727480] ------------[ cut here ]------------
[  141.732349] WARNING: CPU: 1 PID: 2135 at drivers/usb/dwc3/gadget.c:2384 dwc3_stop_active_transfer.constprop.4+0xc4/0xe4 [dwc3]
[  141.744299] Modules linked in: usb_f_ss_lb g_zero libcomposite xhci_plat_hcd xhci_hcd usbcore dwc3 evdev udc_core m25p80 usb_common spi_nor snd_soc_davinci_mcasp snd_soc_simple_card snd_soc_edma snd_soc_tlv3e
[  141.792163] CPU: 1 PID: 2135 Comm: irq/456-dwc3 Not tainted 4.10.0-rc8 #1138
[  141.799547] Hardware name: Generic DRA74X (Flattened Device Tree)
[  141.805940] [&lt;c01101b4&gt;] (unwind_backtrace) from [&lt;c010c31c&gt;] (show_stack+0x10/0x14)
[  141.814066] [&lt;c010c31c&gt;] (show_stack) from [&lt;c04a0918&gt;] (dump_stack+0xac/0xe0)
[  141.821648] [&lt;c04a0918&gt;] (dump_stack) from [&lt;c013708c&gt;] (__warn+0xd8/0x104)
[  141.828955] [&lt;c013708c&gt;] (__warn) from [&lt;c0137164&gt;] (warn_slowpath_null+0x20/0x28)
[  141.836902] [&lt;c0137164&gt;] (warn_slowpath_null) from [&lt;bf27784c&gt;] (dwc3_stop_active_transfer.constprop.4+0xc4/0xe4 [dwc3])
[  141.848329] [&lt;bf27784c&gt;] (dwc3_stop_active_transfer.constprop.4 [dwc3]) from [&lt;bf27ab14&gt;] (__dwc3_gadget_ep_disable+0x64/0x528 [dwc3])
[  141.861034] [&lt;bf27ab14&gt;] (__dwc3_gadget_ep_disable [dwc3]) from [&lt;bf27c27c&gt;] (dwc3_gadget_ep_disable+0x3c/0xc8 [dwc3])
[  141.872280] [&lt;bf27c27c&gt;] (dwc3_gadget_ep_disable [dwc3]) from [&lt;bf23b428&gt;] (usb_ep_disable+0x11c/0x18c [udc_core])
[  141.883160] [&lt;bf23b428&gt;] (usb_ep_disable [udc_core]) from [&lt;bf342774&gt;] (disable_ep+0x18/0x54 [usb_f_ss_lb])
[  141.893408] [&lt;bf342774&gt;] (disable_ep [usb_f_ss_lb]) from [&lt;bf3437b0&gt;] (disable_endpoints+0x18/0x50 [usb_f_ss_lb])
[  141.904168] [&lt;bf3437b0&gt;] (disable_endpoints [usb_f_ss_lb]) from [&lt;bf343814&gt;] (disable_source_sink+0x2c/0x34 [usb_f_ss_lb])
[  141.915771] [&lt;bf343814&gt;] (disable_source_sink [usb_f_ss_lb]) from [&lt;bf329a9c&gt;] (reset_config+0x48/0x7c [libcomposite])
[  141.927012] [&lt;bf329a9c&gt;] (reset_config [libcomposite]) from [&lt;bf329afc&gt;] (composite_disconnect+0x2c/0x54 [libcomposite])
[  141.938444] [&lt;bf329afc&gt;] (composite_disconnect [libcomposite]) from [&lt;bf23d7dc&gt;] (usb_gadget_udc_reset+0x10/0x34 [udc_core])
[  141.950237] [&lt;bf23d7dc&gt;] (usb_gadget_udc_reset [udc_core]) from [&lt;bf276d70&gt;] (dwc3_gadget_reset_interrupt+0x64/0x698 [dwc3])
[  141.962022] [&lt;bf276d70&gt;] (dwc3_gadget_reset_interrupt [dwc3]) from [&lt;bf27952c&gt;] (dwc3_thread_interrupt+0x618/0x1a3c [dwc3])
[  141.973723] [&lt;bf27952c&gt;] (dwc3_thread_interrupt [dwc3]) from [&lt;c01a7ce8&gt;] (irq_thread_fn+0x1c/0x54)
[  141.983215] [&lt;c01a7ce8&gt;] (irq_thread_fn) from [&lt;c01a7fbc&gt;] (irq_thread+0x120/0x1f0)
[  141.991247] [&lt;c01a7fbc&gt;] (irq_thread) from [&lt;c015ba14&gt;] (kthread+0xf8/0x138)
[  141.998641] [&lt;c015ba14&gt;] (kthread) from [&lt;c01078f0&gt;] (ret_from_fork+0x14/0x24)
[  142.006213] ---[ end trace b4ecfe9f175b9a9c ]---

Signed-off-by: Roger Quadros &lt;rogerq@ti.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: dwc3: Fix incorrect type for utmi mode</title>
<updated>2017-03-06T14:47:10+00:00</updated>
<author>
<name>Franck Demathieu</name>
<email>fdemathieu@gmail.com</email>
</author>
<published>2017-02-27T10:52:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=73561128eb72ca04c3be6e240f162a861bf68a86'/>
<id>urn:sha1:73561128eb72ca04c3be6e240f162a861bf68a86</id>
<content type='text'>
The utmi mode is unsigned according the dt-bindings.
Fix sparse issue (-Wtypesign):

  drivers/usb/dwc3/dwc3-omap.c:391:50: warning: incorrect type in argument 3 (different signedness)
  drivers/usb/dwc3/dwc3-omap.c:391:50:    expected unsigned int [usertype] *out_value
  drivers/usb/dwc3/dwc3-omap.c:391:50:    got int *&lt;noident&gt;

Signed-off-by: Franck Demathieu &lt;fdemathieu@gmail.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: dwc3: gadget: properly increment dequeue pointer on ep_dequeue</title>
<updated>2017-03-06T08:09:37+00:00</updated>
<author>
<name>Felipe Balbi</name>
<email>felipe.balbi@linux.intel.com</email>
</author>
<published>2017-02-17T09:12:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cf3113d893d4427b166ec8695460efa7aa660923'/>
<id>urn:sha1:cf3113d893d4427b166ec8695460efa7aa660923</id>
<content type='text'>
If request was already started, this means we had to
stop the transfer. With that we also need to ignore
all TRBs used by the request, however TRBs can only
be modified after completion of END_TRANSFER
command. So what we have to do here is wait for
END_TRANSFER completion and only after that jump
over TRBs by clearing HWO and incrementing dequeue
pointer.

Note that we have 2 possible types of transfers
here:

i) Linear buffer request
ii) SG-list based request

SG-list based requests will have r-&gt;num_pending_sgs
set to a valid number (&gt; 0). Linear requests,
normally use a single TRB.

For each of these two cases, if r-&gt;unaligned flag is
set, one extra TRB has been used to align transfer
size to wMaxPacketSize.

All of these cases need to be taken into
consideration so we don't mess up our TRB ring
pointers.

Tested-by: Janusz Dziedzic &lt;januszx.dziedzic@intel.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: dwc3: gadget: make Set Endpoint Configuration macros safe</title>
<updated>2017-03-06T08:09:37+00:00</updated>
<author>
<name>Felipe Balbi</name>
<email>felipe.balbi@linux.intel.com</email>
</author>
<published>2017-01-31T11:24:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7369090a9fb57c3fc705ce355d2e4523a5a24716'/>
<id>urn:sha1:7369090a9fb57c3fc705ce355d2e4523a5a24716</id>
<content type='text'>
Some gadget drivers are bad, bad boys. We notice
that ADB was passing bad Burst Size which caused top
bits of param0 to be overwritten which confused DWC3
when running this command.

In order to avoid future issues, we're going to make
sure values passed by macros are always safe for the
controller. Note that ADB still needs a fix to *not*
pass bad values.

Cc: &lt;stable@vger.kernel.org&gt; # v3.2+
Reported-by: Mohamed Abbas &lt;mohamed.abbas@intel.com&gt;
Sugested-by: Adam Andruszak &lt;adam.andruszak@intel.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'usb-for-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next</title>
<updated>2017-01-26T14:36:28+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2017-01-26T14:36:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bc46e23c34259c842a138f10acc371e4e2cdb287'/>
<id>urn:sha1:bc46e23c34259c842a138f10acc371e4e2cdb287</id>
<content type='text'>
Felipe writes:

USB: changes for v4.11

Here's the big pull request for the Gadget
API. Again the majority of changes sit in dwc2
driver. Most important changes contain a workaround
for GOTGCTL being wrong, a sleep-inside-spinlock fix
and the big series of cleanups on dwc2.

One important thing on dwc3 is that we don't anymore
need gadget drivers to cope with unaligned OUT
transfers for us. We have support for appending one
extra chained TRB to align transfer ourselves.

Apart from these, the usual set of typos,
non-critical fixes, etc.
</content>
</entry>
<entry>
<title>usb: dwc3: host: pass quirk-broken-port-ped property for known broken revisions</title>
<updated>2017-01-26T09:17:37+00:00</updated>
<author>
<name>Felipe Balbi</name>
<email>felipe.balbi@linux.intel.com</email>
</author>
<published>2017-01-26T09:17:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e42a5dbb8a3d14f5a35bffa3bf7dcb87883f767a'/>
<id>urn:sha1:e42a5dbb8a3d14f5a35bffa3bf7dcb87883f767a</id>
<content type='text'>
dwc3 revisions &lt;=3.00a have a limitation where Port Disable command
doesn't work. Set the quirk-broken-port-ped property for such
controllers so XHCI core can do the necessary workaround.

[rogerq@ti.com] Updated code from platform data to device property.

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>
