<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/usb/musb, branch v4.16</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>usb: musb: Fix external abort in musb_remove on omap2430</title>
<updated>2018-03-13T15:36:59+00:00</updated>
<author>
<name>Merlijn Wajer</name>
<email>merlijn@wizzup.org</email>
</author>
<published>2018-03-13T14:48:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=94e46a4f2d5eb14059e42f313c098d4854847376'/>
<id>94e46a4f2d5eb14059e42f313c098d4854847376</id>
<content type='text'>
This fixes an oops on unbind / module unload (on the musb omap2430
platform).

musb_remove function now calls musb_platform_exit before disabling
runtime pm.

Signed-off-by: Merlijn Wajer &lt;merlijn@wizzup.org&gt;
Signed-off-by: Bin Liu &lt;b-liu@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes an oops on unbind / module unload (on the musb omap2430
platform).

musb_remove function now calls musb_platform_exit before disabling
runtime pm.

Signed-off-by: Merlijn Wajer &lt;merlijn@wizzup.org&gt;
Signed-off-by: Bin Liu &lt;b-liu@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: musb: call pm_runtime_{get,put}_sync before reading vbus registers</title>
<updated>2018-03-06T17:17:34+00:00</updated>
<author>
<name>Merlijn Wajer</name>
<email>merlijn@wizzup.org</email>
</author>
<published>2018-03-05T17:35:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=df6b074dbe248d8c43a82131e8fd429e401841a5'/>
<id>df6b074dbe248d8c43a82131e8fd429e401841a5</id>
<content type='text'>
Without pm_runtime_{get,put}_sync calls in place, reading
vbus status via /sys causes the following error:

Unhandled fault: external abort on non-linefetch (0x1028) at 0xfa0ab060
pgd = b333e822
[fa0ab060] *pgd=48011452(bad)

[&lt;c05261b0&gt;] (musb_default_readb) from [&lt;c0525bd0&gt;] (musb_vbus_show+0x58/0xe4)
[&lt;c0525bd0&gt;] (musb_vbus_show) from [&lt;c04c0148&gt;] (dev_attr_show+0x20/0x44)
[&lt;c04c0148&gt;] (dev_attr_show) from [&lt;c0259f74&gt;] (sysfs_kf_seq_show+0x80/0xdc)
[&lt;c0259f74&gt;] (sysfs_kf_seq_show) from [&lt;c0210bac&gt;] (seq_read+0x250/0x448)
[&lt;c0210bac&gt;] (seq_read) from [&lt;c01edb40&gt;] (__vfs_read+0x1c/0x118)
[&lt;c01edb40&gt;] (__vfs_read) from [&lt;c01edccc&gt;] (vfs_read+0x90/0x144)
[&lt;c01edccc&gt;] (vfs_read) from [&lt;c01ee1d0&gt;] (SyS_read+0x3c/0x74)
[&lt;c01ee1d0&gt;] (SyS_read) from [&lt;c0106fe0&gt;] (ret_fast_syscall+0x0/0x54)

Solution was suggested by Tony Lindgren &lt;tony@atomide.com&gt;.

Signed-off-by: Merlijn Wajer &lt;merlijn@wizzup.org&gt;
Acked-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Bin Liu &lt;b-liu@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Without pm_runtime_{get,put}_sync calls in place, reading
vbus status via /sys causes the following error:

Unhandled fault: external abort on non-linefetch (0x1028) at 0xfa0ab060
pgd = b333e822
[fa0ab060] *pgd=48011452(bad)

[&lt;c05261b0&gt;] (musb_default_readb) from [&lt;c0525bd0&gt;] (musb_vbus_show+0x58/0xe4)
[&lt;c0525bd0&gt;] (musb_vbus_show) from [&lt;c04c0148&gt;] (dev_attr_show+0x20/0x44)
[&lt;c04c0148&gt;] (dev_attr_show) from [&lt;c0259f74&gt;] (sysfs_kf_seq_show+0x80/0xdc)
[&lt;c0259f74&gt;] (sysfs_kf_seq_show) from [&lt;c0210bac&gt;] (seq_read+0x250/0x448)
[&lt;c0210bac&gt;] (seq_read) from [&lt;c01edb40&gt;] (__vfs_read+0x1c/0x118)
[&lt;c01edb40&gt;] (__vfs_read) from [&lt;c01edccc&gt;] (vfs_read+0x90/0x144)
[&lt;c01edccc&gt;] (vfs_read) from [&lt;c01ee1d0&gt;] (SyS_read+0x3c/0x74)
[&lt;c01ee1d0&gt;] (SyS_read) from [&lt;c0106fe0&gt;] (ret_fast_syscall+0x0/0x54)

Solution was suggested by Tony Lindgren &lt;tony@atomide.com&gt;.

Signed-off-by: Merlijn Wajer &lt;merlijn@wizzup.org&gt;
Acked-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Bin Liu &lt;b-liu@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "usb: musb: host: don't start next rx urb if current one failed"</title>
<updated>2018-02-20T14:02:46+00:00</updated>
<author>
<name>Bin Liu</name>
<email>b-liu@ti.com</email>
</author>
<published>2018-02-20T13:31:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=44eb5e12b845cc8a0634f21b70ef07d774eb4b25'/>
<id>44eb5e12b845cc8a0634f21b70ef07d774eb4b25</id>
<content type='text'>
This reverts commit dbac5d07d13e330e6706813c9fde477140fb5d80.

commit dbac5d07d13e ("usb: musb: host: don't start next rx urb if current one failed")
along with commit b5801212229f ("usb: musb: host: clear rxcsr error bit if set")
try to solve the issue described in [1], but the latter alone is
sufficient, and the former causes the issue as in [2], so now revert it.

[1] https://marc.info/?l=linux-usb&amp;m=146173995117456&amp;w=2
[2] https://marc.info/?l=linux-usb&amp;m=151689238420622&amp;w=2

Cc: stable@vger.kernel.org # v4.7+
Signed-off-by: Bin Liu &lt;b-liu@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit dbac5d07d13e330e6706813c9fde477140fb5d80.

commit dbac5d07d13e ("usb: musb: host: don't start next rx urb if current one failed")
along with commit b5801212229f ("usb: musb: host: clear rxcsr error bit if set")
try to solve the issue described in [1], but the latter alone is
sufficient, and the former causes the issue as in [2], so now revert it.

[1] https://marc.info/?l=linux-usb&amp;m=146173995117456&amp;w=2
[2] https://marc.info/?l=linux-usb&amp;m=151689238420622&amp;w=2

Cc: stable@vger.kernel.org # v4.7+
Signed-off-by: Bin Liu &lt;b-liu@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: musb: fix enumeration after resume</title>
<updated>2018-02-20T14:02:46+00:00</updated>
<author>
<name>Andreas Kemnade</name>
<email>andreas@kemnade.info</email>
</author>
<published>2018-02-20T13:30:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=17539f2f4f0b7fa906b508765c8ada07a1e45f52'/>
<id>17539f2f4f0b7fa906b508765c8ada07a1e45f52</id>
<content type='text'>
On dm3730 there are enumeration problems after resume.
Investigation led to the cause that the MUSB_POWER_SOFTCONN
bit is not set. If it was set before suspend (because it
was enabled via musb_pullup()), it is set in
musb_restore_context() so the pullup is enabled. But then
musb_start() is called which overwrites MUSB_POWER and
therefore disables MUSB_POWER_SOFTCONN, so no pullup is
enabled and the device is not enumerated.

So let's do a subset of what musb_start() does
in the same way as musb_suspend() does it. Platform-specific
stuff it still called as there might be some phy-related stuff
which needs to be enabled.
Also interrupts are enabled, as it was the original idea
of calling musb_start() in musb_resume() according to
Commit 6fc6f4b87cb3 ("usb: musb: Disable interrupts on suspend,
enable them on resume")

Signed-off-by: Andreas Kemnade &lt;andreas@kemnade.info&gt;
Tested-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Bin Liu &lt;b-liu@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On dm3730 there are enumeration problems after resume.
Investigation led to the cause that the MUSB_POWER_SOFTCONN
bit is not set. If it was set before suspend (because it
was enabled via musb_pullup()), it is set in
musb_restore_context() so the pullup is enabled. But then
musb_start() is called which overwrites MUSB_POWER and
therefore disables MUSB_POWER_SOFTCONN, so no pullup is
enabled and the device is not enumerated.

So let's do a subset of what musb_start() does
in the same way as musb_suspend() does it. Platform-specific
stuff it still called as there might be some phy-related stuff
which needs to be enabled.
Also interrupts are enabled, as it was the original idea
of calling musb_start() in musb_resume() according to
Commit 6fc6f4b87cb3 ("usb: musb: Disable interrupts on suspend,
enable them on resume")

Signed-off-by: Andreas Kemnade &lt;andreas@kemnade.info&gt;
Tested-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Bin Liu &lt;b-liu@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>USB: musb: fix up one odd DEVICE_ATTR() usage</title>
<updated>2018-01-24T07:49:52+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2018-01-23T10:24:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6e4294d0af78d64935c108e275a632725a4a31aa'/>
<id>6e4294d0af78d64935c108e275a632725a4a31aa</id>
<content type='text'>
It really should be DEVICE_ATTR_WO(), no need to "open code" it.

Acked-by: Bin Liu &lt;b-liu@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It really should be DEVICE_ATTR_WO(), no need to "open code" it.

Acked-by: Bin Liu &lt;b-liu@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>USB: move many drivers to use DEVICE_ATTR_RW</title>
<updated>2018-01-24T07:49:51+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2018-01-23T10:24:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=ed5bd7a47fd77166860e39f857ae8e3fe25c836c'/>
<id>ed5bd7a47fd77166860e39f857ae8e3fe25c836c</id>
<content type='text'>
Instead of "open coding" a DEVICE_ATTR() define, use the
DEVICE_ATTR_RW() macro instead, which does everything properly instead.

This does require a few static functions to be renamed to work properly,
but thanks to a script from Joe Perches, this was easily done.

Reported-by: Joe Perches &lt;joe@perches.com&gt;
Cc: Matthieu CASTET &lt;castet.matthieu@free.fr&gt;
Cc: Stanislaw Gruszka &lt;stf_xl@wp.pl&gt;
Cc: Peter Chen &lt;Peter.Chen@nxp.com&gt;
Cc: Mathias Nyman &lt;mathias.nyman@intel.com&gt;
Acked-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Acked-by: Bin Liu &lt;b-liu@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of "open coding" a DEVICE_ATTR() define, use the
DEVICE_ATTR_RW() macro instead, which does everything properly instead.

This does require a few static functions to be renamed to work properly,
but thanks to a script from Joe Perches, this was easily done.

Reported-by: Joe Perches &lt;joe@perches.com&gt;
Cc: Matthieu CASTET &lt;castet.matthieu@free.fr&gt;
Cc: Stanislaw Gruszka &lt;stf_xl@wp.pl&gt;
Cc: Peter Chen &lt;Peter.Chen@nxp.com&gt;
Cc: Mathias Nyman &lt;mathias.nyman@intel.com&gt;
Acked-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Acked-by: Bin Liu &lt;b-liu@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>USB: musb: da8xx: remove clock con_id</title>
<updated>2018-01-09T15:15:19+00:00</updated>
<author>
<name>David Lechner</name>
<email>david@lechnology.com</email>
</author>
<published>2018-01-07T03:19:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=985583a696e0a32708b8d2e10e7c98790acd7eeb'/>
<id>985583a696e0a32708b8d2e10e7c98790acd7eeb</id>
<content type='text'>
There is only one clock for the DA8xx MUSB device, so we don't need the
con_id, so remove it. This way we don't have to add an unnecessary
property to the device tree bindings for the clock.

Signed-off-by: David Lechner &lt;david@lechnology.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is only one clock for the DA8xx MUSB device, so we don't need the
con_id, so remove it. This way we don't have to add an unnecessary
property to the device tree bindings for the clock.

Signed-off-by: David Lechner &lt;david@lechnology.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: musb: remove unused pipe variable</title>
<updated>2018-01-02T16:33:21+00:00</updated>
<author>
<name>Corentin Labbe</name>
<email>clabbe@baylibre.com</email>
</author>
<published>2017-12-26T19:33:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=3f514f97ee82bf1dcf860a0ad0aebd637159e107'/>
<id>3f514f97ee82bf1dcf860a0ad0aebd637159e107</id>
<content type='text'>
This patch fix the following build warning:
drivers/usb/musb/musb_host.c:1809:8: warning: variable 'pipe' set but not used [-Wunused-but-set-variable]
by removing the pipe variable in musb_host_rx()

Signed-off-by: Corentin Labbe &lt;clabbe@baylibre.com&gt;
Signed-off-by: Bin Liu &lt;b-liu@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fix the following build warning:
drivers/usb/musb/musb_host.c:1809:8: warning: variable 'pipe' set but not used [-Wunused-but-set-variable]
by removing the pipe variable in musb_host_rx()

Signed-off-by: Corentin Labbe &lt;clabbe@baylibre.com&gt;
Signed-off-by: Bin Liu &lt;b-liu@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: musb: remove unused frame variable</title>
<updated>2018-01-02T16:33:21+00:00</updated>
<author>
<name>Corentin Labbe</name>
<email>clabbe@baylibre.com</email>
</author>
<published>2017-12-26T19:33:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=576ec7fd93c32d1ec56dcf69099848da81e4ec4c'/>
<id>576ec7fd93c32d1ec56dcf69099848da81e4ec4c</id>
<content type='text'>
This patch fix the following warning
drivers/usb/musb/musb_host.c:223:8: warning: variable 'frame' set but not used [-Wunused-but-set-variable]
by remove the frame variable in musb_start_urb().

Signed-off-by: Corentin Labbe &lt;clabbe@baylibre.com&gt;
Signed-off-by: Bin Liu &lt;b-liu@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fix the following warning
drivers/usb/musb/musb_host.c:223:8: warning: variable 'frame' set but not used [-Wunused-but-set-variable]
by remove the frame variable in musb_start_urb().

Signed-off-by: Corentin Labbe &lt;clabbe@baylibre.com&gt;
Signed-off-by: Bin Liu &lt;b-liu@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: musb: da8xx: fix babble condition handling</title>
<updated>2017-12-08T16:31:20+00:00</updated>
<author>
<name>Bin Liu</name>
<email>b-liu@ti.com</email>
</author>
<published>2017-12-05T14:45:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=bd3486ded7a0c313a6575343e6c2b21d14476645'/>
<id>bd3486ded7a0c313a6575343e6c2b21d14476645</id>
<content type='text'>
When babble condition happens, the musb controller might automatically
turns off VBUS. On DA8xx platform, the controller generates drvvbus
interrupt for turning off VBUS along with the babble interrupt.

In this case, we should handle the babble interrupt first and recover
from the babble condition.

This change ignores the drvvbus interrupt if babble interrupt is also
generated at the same time, so the babble recovery routine works
properly.

Cc: stable@vger.kernel.org # v3.16+
Signed-off-by: Bin Liu &lt;b-liu@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When babble condition happens, the musb controller might automatically
turns off VBUS. On DA8xx platform, the controller generates drvvbus
interrupt for turning off VBUS along with the babble interrupt.

In this case, we should handle the babble interrupt first and recover
from the babble condition.

This change ignores the drvvbus interrupt if babble interrupt is also
generated at the same time, so the babble recovery routine works
properly.

Cc: stable@vger.kernel.org # v3.16+
Signed-off-by: Bin Liu &lt;b-liu@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
