<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/usb/dwc2/core.c, branch linux-4.16.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.16.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.16.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2017-11-04T10:48:02Z</updated>
<entry>
<title>USB: add SPDX identifiers to all remaining files in drivers/usb/</title>
<updated>2017-11-04T10:48:02Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2017-11-03T10:28:30Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5fd54ace4721fc5ce2bb5aef6318fcf17f421460'/>
<id>urn:sha1:5fd54ace4721fc5ce2bb5aef6318fcf17f421460</id>
<content type='text'>
It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.

Update the drivers/usb/ and include/linux/usb* files with the correct
SPDX license identifier based on the license text in the file itself.
The SPDX identifier is a legally binding shorthand, which can be used
instead of the full boiler plate text.

This work is based on a script and data from Thomas Gleixner, Philippe
Ombredanne, and Kate Stewart.

Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Kate Stewart &lt;kstewart@linuxfoundation.org&gt;
Cc: Philippe Ombredanne &lt;pombredanne@nexb.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Acked-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
Acked-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: dwc2: host: use msleep() for long delay</title>
<updated>2017-01-24T14:19:10Z</updated>
<author>
<name>Nicholas Mc Guire</name>
<email>hofrat@osadl.org</email>
</author>
<published>2017-01-23T23:00:40Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d3fe81d2ccc41b355e494413115c0c7c18426fa1'/>
<id>urn:sha1:d3fe81d2ccc41b355e494413115c0c7c18426fa1</id>
<content type='text'>
ulseep_range() uses hrtimers and provides no advantage over msleep()
for larger delays. Fix up the 100ms delays here passing the adjusted "min"
value to msleep(). This helps reduce the load on the hrtimer subsystem.

Link: http://lkml.org/lkml/2017/1/11/377
Fixes: commit 2938fc63e0c2 ("usb: dwc2: Properly account for the force mode delays")
Signed-off-by: Nicholas Mc Guire &lt;hofrat@osadl.org&gt;
Signed-off-by: John Youn &lt;johnyoun@synopsys.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: dwc2: Avoid sleeping while holding hsotg-&gt;lock</title>
<updated>2017-01-24T14:19:08Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2017-01-23T22:59:14Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6e6360b67d12370638ad1bc8943cc63d4c89da27'/>
<id>urn:sha1:6e6360b67d12370638ad1bc8943cc63d4c89da27</id>
<content type='text'>
Basically when plugging in various cables in different orders, I'm
occasionally seeing the following BUG splat:

[   86.215403] BUG: scheduling while atomic: kworker/u16:2/53/0x00000002
[   86.219164] usb 1-1: USB disconnect, device number 9
[   86.226845] Preemption disabled at:[   86.230218]
[&lt;ffffff8008673558&gt;] dwc2_conn_id_status_change+0x120/0x250
[   86.236894] CPU: 0 PID: 53 Comm: kworker/u16:2 Tainted: G        W
     4.9.0-rc8-00051-gd5a7979-dirty #1702
[   86.246836] Hardware name: HiKey Development Board (DT)
[   86.252100] Workqueue: dwc2 dwc2_conn_id_status_change
[   86.257279] Call trace:
[   86.259771] [&lt;ffffff8008087c28&gt;] dump_backtrace+0x0/0x1a0
[   86.265210] [&lt;ffffff8008087ddc&gt;] show_stack+0x14/0x20
[   86.270308] [&lt;ffffff80084343f0&gt;] dump_stack+0x90/0xb0
[   86.275401] [&lt;ffffff80080d8d94&gt;] __schedule_bug+0x6c/0xb8
[   86.280841] [&lt;ffffff8008a07220&gt;] __schedule+0x4f8/0x5b0
[   86.286099] [&lt;ffffff8008a073e8&gt;] schedule+0x38/0xa0
[   86.291017] [&lt;ffffff8008a0a6cc&gt;] schedule_hrtimeout_range_clock+0x8c/0xf0
[   86.297846] [&lt;ffffff8008a0a740&gt;] schedule_hrtimeout_range+0x10/0x18
[   86.304150] [&lt;ffffff8008a0a4a0&gt;] usleep_range+0x50/0x58
[   86.309418] [&lt;ffffff800866d8dc&gt;] dwc2_wait_for_mode.isra.4+0x54/0xd0
[   86.315815] [&lt;ffffff800866f058&gt;] dwc2_core_reset+0xe0/0x168
[   86.321431] [&lt;ffffff800867e364&gt;] dwc2_hsotg_core_init_disconnected+0x2c/0x310
[   86.328602] [&lt;ffffff8008673568&gt;] dwc2_conn_id_status_change+0x130/0x250
[   86.335254] [&lt;ffffff80080ccd48&gt;] process_one_work+0x118/0x370
[   86.341035] [&lt;ffffff80080ccfe8&gt;] worker_thread+0x48/0x498
[   86.346473] [&lt;ffffff80080d2eb0&gt;] kthread+0xd0/0xe8
[   86.351299] [&lt;ffffff8008082e80&gt;] ret_from_fork+0x10/0x50

This seems to be caused by the dwc2_wait_for_mode() calling
usleep_range() while the hstog-&gt;lock spinlock is held, since
we take that before calling dwc2_hsotg_core_init_disconnected().

This patch avoids the issue by adding an extra argument to
dwc2_core_reset(), as suggested by John Youn, which allows us to
skip the waiting, which should be unnecessary when calling from
dwc2_hsotg_core_init_disconnected().

Cc: Wei Xu &lt;xuwei5@hisilicon.com&gt;
Cc: Guodong Xu &lt;guodong.xu@linaro.org&gt;
Cc: Amit Pundir &lt;amit.pundir@linaro.org&gt;
Cc: Rob Herring &lt;robh+dt@kernel.org&gt;
Cc: John Youn &lt;johnyoun@synopsys.com&gt;
Cc: Douglas Anderson &lt;dianders@chromium.org&gt;
Cc: Chen Yu &lt;chenyu56@huawei.com&gt;
Cc: Vardan Mikayelyan &lt;mvardan@synopsys.com&gt;
Cc: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
Cc: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: linux-usb@vger.kernel.org
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
Signed-off-by: John Youn &lt;johnyoun@synopsys.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: dwc2: Fix usage of bool params</title>
<updated>2017-01-24T14:19:07Z</updated>
<author>
<name>John Youn</name>
<email>John.Youn@synopsys.com</email>
</author>
<published>2017-01-23T22:57:26Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=95832c00bc5ce3ed140f5f9b669803f75ac1431e'/>
<id>urn:sha1:95832c00bc5ce3ed140f5f9b669803f75ac1431e</id>
<content type='text'>
Check these parameters only for true or false. There is no need to check
for greater or less than 0.

Signed-off-by: John Youn &lt;johnyoun@synopsys.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: dwc2: Remove unused otg_ver parameter</title>
<updated>2017-01-24T14:19:04Z</updated>
<author>
<name>John Youn</name>
<email>John.Youn@synopsys.com</email>
</author>
<published>2017-01-23T22:54:52Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=0f3a7459ae2fd47cce099735ea3260979729cbfd'/>
<id>urn:sha1:0f3a7459ae2fd47cce099735ea3260979729cbfd</id>
<content type='text'>
The otg_ver parameter only controls the SRP pulsing method and defaults
to the 1.3 behavior. It is unused and can be removed.

Signed-off-by: John Youn &lt;johnyoun@synopsys.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: dwc2: Cleanup some checkpatch issues</title>
<updated>2017-01-24T09:04:18Z</updated>
<author>
<name>John Youn</name>
<email>John.Youn@synopsys.com</email>
</author>
<published>2017-01-18T04:30:27Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=9da5197475a09e51a467388308f14dcbdcee8ba9'/>
<id>urn:sha1:9da5197475a09e51a467388308f14dcbdcee8ba9</id>
<content type='text'>
This commmit is the result of running checkpatch --fix.

The results were verified for correctness. Some of the fixes result in
line over 80 char which we will fix manually later.

The following is a summary of what was done by checkpatch:
* Remove externs on function prototypes.
* Replace symbolic permissions with octal.
* Align code to open parens.
* Replace 'unsigned' with 'unsigned int'.
* Remove unneccessary blank lines.
* Add blank lines after declarations.
* Add spaces around operators.
* Remove unnecessary spaces after casts.
* Replace 'x == NULL' with '!x'.
* Replace kzalloc() with kcalloc().
* Concatenate multi-line strings.
* Use the BIT() macro.

Signed-off-by: John Youn &lt;johnyoun@synopsys.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: dwc2: Declare the core params struct statically</title>
<updated>2016-11-18T11:54:11Z</updated>
<author>
<name>John Youn</name>
<email>johnyoun@synopsys.com</email>
</author>
<published>2016-11-04T00:55:53Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=bea8e86c51cf9cf637e5bf0610d14674e9115783'/>
<id>urn:sha1:bea8e86c51cf9cf637e5bf0610d14674e9115783</id>
<content type='text'>
This makes it consistent with the hw_params struct and simplifies the
memory management for future refactoring. Fix up usage in all files.

Signed-off-by: John Youn &lt;johnyoun@synopsys.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: dwc2: Add params.c file</title>
<updated>2016-11-18T11:54:10Z</updated>
<author>
<name>John Youn</name>
<email>johnyoun@synopsys.com</email>
</author>
<published>2016-11-04T00:55:50Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=323230ef4ef17512007c22898b008e9fb87b372e'/>
<id>urn:sha1:323230ef4ef17512007c22898b008e9fb87b372e</id>
<content type='text'>
Add a params.c file and move all driver parameter code there, including
all the static parameter definitions.

Signed-off-by: John Youn &lt;johnyoun@synopsys.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: dwc2: Add msleep for host-only</title>
<updated>2016-10-17T09:30:29Z</updated>
<author>
<name>Heiko Stuebner</name>
<email>heiko@sntech.de</email>
</author>
<published>2016-10-14T17:47:24Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a07ce8d34eb3d9c6cec3aa25f7713e6aafad2260'/>
<id>urn:sha1:a07ce8d34eb3d9c6cec3aa25f7713e6aafad2260</id>
<content type='text'>
Although a host-only controller should not have any associated delay,
some rockchip SOC platforms will not show the correct host-values of
registers until after a delay.

So add a 50 ms sleep when in host-only mode.

Signed-off-by: John Youn &lt;johnyoun@synopsys.com&gt;
Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: dwc2: Properly account for the force mode delays</title>
<updated>2016-09-08T11:02:54Z</updated>
<author>
<name>John Youn</name>
<email>johnyoun@synopsys.com</email>
</author>
<published>2016-09-08T02:39:43Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2938fc63e0c26bf694436ac81bc776c8b7eced0c'/>
<id>urn:sha1:2938fc63e0c26bf694436ac81bc776c8b7eced0c</id>
<content type='text'>
When a force mode bit is set and the IDDIG debounce filter is enabled,
there is a delay for the forced mode to take effect. This delay is due
to the IDDIG debounce filter and is variable depending on the platform's
PHY clock speed. To account for this delay we can poll for the expected
mode.

On a clear force mode, since we don't know what mode to poll for, delay
for a fixed 100 ms. This is the maximum delay based on the slowest PHY
clock speed.

Tested-by: Stefan Wahren &lt;stefan.wahren@i2se.com&gt;
Signed-off-by: John Youn &lt;johnyoun@synopsys.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
</feed>
