<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/usb/musb, 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>2018-06-20T19:01:44Z</updated>
<entry>
<title>usb: musb: fix remote wakeup racing with suspend</title>
<updated>2018-06-20T19:01:44Z</updated>
<author>
<name>Daniel Glöckner</name>
<email>dg@emlix.com</email>
</author>
<published>2018-05-14T14:40:05Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=86c7d837a0bd3d231486203532f835907c3d2e35'/>
<id>urn:sha1:86c7d837a0bd3d231486203532f835907c3d2e35</id>
<content type='text'>
[ Upstream commit ebc3dd688cd988754a304147753b13e58de1b5a1 ]

It has been observed that writing 0xF2 to the power register while it
reads as 0xF4 results in the register having the value 0xF0, i.e. clearing
RESUME and setting SUSPENDM in one go does not work. It might also violate
the USB spec to transition directly from resume to suspend, especially
when not taking T_DRSMDN into account. But this is what happens when a
remote wakeup occurs between SetPortFeature USB_PORT_FEAT_SUSPEND on the
root hub and musb_bus_suspend being called.

This commit returns -EBUSY when musb_bus_suspend is called while remote
wakeup is signalled and thus avoids to reset the RESUME bit. Ignoring
this error when musb_port_suspend is called from musb_hub_control is ok.

Signed-off-by: Daniel Glöckner &lt;dg@emlix.com&gt;
Signed-off-by: Bin Liu &lt;b-liu@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: musb: trace: fix NULL pointer dereference in musb_g_tx()</title>
<updated>2018-05-09T07:53:12Z</updated>
<author>
<name>Bin Liu</name>
<email>b-liu@ti.com</email>
</author>
<published>2018-04-30T16:20:54Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1e4bc8f857d05e2ea6a983f8357756c7c54fbb4d'/>
<id>urn:sha1:1e4bc8f857d05e2ea6a983f8357756c7c54fbb4d</id>
<content type='text'>
commit 9aea9b6cc78d2b99b23d84fb2e0bc6e464c6569e upstream.

The usb_request pointer could be NULL in musb_g_tx(), where the
tracepoint call would trigger the NULL pointer dereference failure when
parsing the members of the usb_request pointer.

Move the tracepoint call to where the usb_request pointer is already
checked to solve the issue.

Fixes: fc78003e5345 ("usb: musb: gadget: add usb-request tracepoints")
Cc: stable@vger.kernel.org # v4.8+
Signed-off-by: Bin Liu &lt;b-liu@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: musb: host: fix potential NULL pointer dereference</title>
<updated>2018-05-09T07:53:11Z</updated>
<author>
<name>Bin Liu</name>
<email>b-liu@ti.com</email>
</author>
<published>2018-04-30T16:20:53Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3d5311a679dd2c2e48023de76ead896fde377590'/>
<id>urn:sha1:3d5311a679dd2c2e48023de76ead896fde377590</id>
<content type='text'>
commit 2b63f1329df2cd814c1f8353fae4853ace6521d1 upstream.

musb_start_urb() doesn't check the pass-in parameter if it is NULL.  But
in musb_bulk_nak_timeout() the parameter passed to musb_start_urb() is
returned from first_qh(), which could be NULL.

So wrap the musb_start_urb() call here with a if condition check to
avoid the potential NULL pointer dereference.

Fixes: f283862f3b5c ("usb: musb: NAK timeout scheme on bulk TX endpoint")
Cc: stable@vger.kernel.org # v3.7+
Signed-off-by: Bin Liu &lt;b-liu@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: musb: gadget: misplaced out of bounds check</title>
<updated>2018-04-24T07:42:50Z</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>xypron.glpk@gmx.de</email>
</author>
<published>2018-03-29T15:48:28Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=522854d21b1b2858bff7094b0baf55b3c6ee15ad'/>
<id>urn:sha1:522854d21b1b2858bff7094b0baf55b3c6ee15ad</id>
<content type='text'>
commit af6f8529098aeb0e56a68671b450cf74e7a64fcd upstream.

musb-&gt;endpoints[] has array size MUSB_C_NUM_EPS.
We must check array bounds before accessing the array and not afterwards.

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Signed-off-by: Bin Liu &lt;b-liu@ti.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: musb: Fix external abort in musb_remove on omap2430</title>
<updated>2018-03-13T15:36:59Z</updated>
<author>
<name>Merlijn Wajer</name>
<email>merlijn@wizzup.org</email>
</author>
<published>2018-03-13T14:48:40Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=94e46a4f2d5eb14059e42f313c098d4854847376'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>usb: musb: call pm_runtime_{get,put}_sync before reading vbus registers</title>
<updated>2018-03-06T17:17:34Z</updated>
<author>
<name>Merlijn Wajer</name>
<email>merlijn@wizzup.org</email>
</author>
<published>2018-03-05T17:35:10Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=df6b074dbe248d8c43a82131e8fd429e401841a5'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>Revert "usb: musb: host: don't start next rx urb if current one failed"</title>
<updated>2018-02-20T14:02:46Z</updated>
<author>
<name>Bin Liu</name>
<email>b-liu@ti.com</email>
</author>
<published>2018-02-20T13:31:35Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=44eb5e12b845cc8a0634f21b70ef07d774eb4b25'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>usb: musb: fix enumeration after resume</title>
<updated>2018-02-20T14:02:46Z</updated>
<author>
<name>Andreas Kemnade</name>
<email>andreas@kemnade.info</email>
</author>
<published>2018-02-20T13:30:10Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=17539f2f4f0b7fa906b508765c8ada07a1e45f52'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>USB: musb: fix up one odd DEVICE_ATTR() usage</title>
<updated>2018-01-24T07:49:52Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2018-01-23T10:24:09Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6e4294d0af78d64935c108e275a632725a4a31aa'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>USB: move many drivers to use DEVICE_ATTR_RW</title>
<updated>2018-01-24T07:49:51Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2018-01-23T10:24:05Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ed5bd7a47fd77166860e39f857ae8e3fe25c836c'/>
<id>urn:sha1: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>
</entry>
</feed>
