<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/usb/chipidea, branch v4.14.263</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.14.263</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.14.263'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2021-11-26T10:40:36+00:00</updated>
<entry>
<title>USB: chipidea: fix interrupt deadlock</title>
<updated>2021-11-26T10:40:36+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2021-10-21T08:34:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f61419119c90e12b7216838a93749dbb4c4d11d9'/>
<id>urn:sha1:f61419119c90e12b7216838a93749dbb4c4d11d9</id>
<content type='text'>
commit 9aaa81c3366e8393a62374e3a1c67c69edc07b8a upstream.

Chipidea core was calling the interrupt handler from non-IRQ context
with interrupts enabled, something which can lead to a deadlock if
there's an actual interrupt trying to take a lock that's already held
(e.g. the controller lock in udc_irq()).

Add a wrapper that can be used to fake interrupts instead of calling the
handler directly.

Fixes: 3ecb3e09b042 ("usb: chipidea: Use extcon framework for VBUS and ID detect")
Fixes: 876d4e1e8298 ("usb: chipidea: core: add wakeup support for extcon")
Cc: Peter Chen &lt;peter.chen@kernel.org&gt;
Cc: stable@vger.kernel.org      # 4.4
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Link: https://lore.kernel.org/r/20211021083447.20078-1-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: chipidea: ci_hdrc_imx: add missing put_device() call in usbmisc_get_init_data()</title>
<updated>2021-01-12T19:09:10+00:00</updated>
<author>
<name>Yu Kuai</name>
<email>yukuai3@huawei.com</email>
</author>
<published>2020-11-17T01:14:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=06ff486be1025259bcc35a04e4786a071a189857'/>
<id>urn:sha1:06ff486be1025259bcc35a04e4786a071a189857</id>
<content type='text'>
commit 83a43ff80a566de8718dfc6565545a0080ec1fb5 upstream.

if of_find_device_by_node() succeed, usbmisc_get_init_data() doesn't have
a corresponding put_device(). Thus add put_device() to fix the exception
handling for this function implementation.

Fixes: ef12da914ed6 ("usb: chipidea: imx: properly check for usbmisc")
Signed-off-by: Yu Kuai &lt;yukuai3@huawei.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/20201117011430.642589-1-yukuai3@huawei.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: chipidea: ci_hdrc_imx: Pass DISABLE_DEVICE_STREAMING flag to imx6ul</title>
<updated>2020-12-29T12:46:49+00:00</updated>
<author>
<name>Fabio Estevam</name>
<email>festevam@gmail.com</email>
</author>
<published>2020-12-07T02:09:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0361d65da296e70d0b49b806f5540d3df71bdb6a'/>
<id>urn:sha1:0361d65da296e70d0b49b806f5540d3df71bdb6a</id>
<content type='text'>
commit c7721e15f434920145c376e8fe77e1c079fc3726 upstream.

According to the i.MX6UL Errata document:
https://www.nxp.com/docs/en/errata/IMX6ULCE.pdf

ERR007881 also affects i.MX6UL, so pass the
CI_HDRC_DISABLE_DEVICE_STREAMING flag to workaround the issue.

Fixes: 52fe568e5d71 ("usb: chipidea: imx: add imx6ul usb support")
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Fabio Estevam &lt;festevam@gmail.com&gt;
Signed-off-by: Peter Chen &lt;peter.chen@nxp.com&gt;
Link: https://lore.kernel.org/r/20201207020909.22483-2-peter.chen@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: chipidea: core: add wakeup support for extcon</title>
<updated>2020-07-22T07:22:26+00:00</updated>
<author>
<name>Peter Chen</name>
<email>peter.chen@nxp.com</email>
</author>
<published>2020-07-07T06:06:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0a3094db01722d06e1962b1e92293ba14317479e'/>
<id>urn:sha1:0a3094db01722d06e1962b1e92293ba14317479e</id>
<content type='text'>
commit 876d4e1e8298ad1f94d9e9392fc90486755437b4 upstream.

If wakeup event occurred by extcon event, it needs to call
ci_irq again since the first ci_irq calling at extcon notifier
only wakes up controller, but do noop for event handling,
it causes the extcon use case can't work well from low power mode.

Cc: &lt;stable@vger.kernel.org&gt;
Fixes: 3ecb3e09b042 ("usb: chipidea: Use extcon framework for VBUS and ID detect")
Reported-by: Philippe Schenker &lt;philippe.schenker@toradex.com&gt;
Tested-by: Philippe Schenker &lt;philippe.schenker@toradex.com&gt;
Signed-off-by: Peter Chen &lt;peter.chen@nxp.com&gt;
Link: https://lore.kernel.org/r/20200707060601.31907-2-peter.chen@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: chipidea: host: Disable port power only if previously enabled</title>
<updated>2020-01-14T19:05:39+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2019-12-26T15:57:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c07d275dd30f95d063ba27a83e8793bcf1afb8d7'/>
<id>urn:sha1:c07d275dd30f95d063ba27a83e8793bcf1afb8d7</id>
<content type='text'>
commit c1ffba305dbcf3fb9ca969c20a97acbddc38f8e9 upstream.

On shutdown, ehci_power_off() is called unconditionally to power off
each port, even if it was never called to power on the port.
For chipidea, this results in a call to ehci_ci_portpower() with a request
to power off ports even if the port was never powered on.
This results in the following warning from the regulator code.

WARNING: CPU: 0 PID: 182 at drivers/regulator/core.c:2596 _regulator_disable+0x1a8/0x210
unbalanced disables for usb_otg2_vbus
Modules linked in:
CPU: 0 PID: 182 Comm: init Not tainted 5.4.6 #1
Hardware name: Freescale i.MX7 Dual (Device Tree)
[&lt;c0313658&gt;] (unwind_backtrace) from [&lt;c030d698&gt;] (show_stack+0x10/0x14)
[&lt;c030d698&gt;] (show_stack) from [&lt;c1133afc&gt;] (dump_stack+0xe0/0x10c)
[&lt;c1133afc&gt;] (dump_stack) from [&lt;c0349098&gt;] (__warn+0xf4/0x10c)
[&lt;c0349098&gt;] (__warn) from [&lt;c0349128&gt;] (warn_slowpath_fmt+0x78/0xbc)
[&lt;c0349128&gt;] (warn_slowpath_fmt) from [&lt;c09f36ac&gt;] (_regulator_disable+0x1a8/0x210)
[&lt;c09f36ac&gt;] (_regulator_disable) from [&lt;c09f374c&gt;] (regulator_disable+0x38/0xe8)
[&lt;c09f374c&gt;] (regulator_disable) from [&lt;c0df7bac&gt;] (ehci_ci_portpower+0x38/0xdc)
[&lt;c0df7bac&gt;] (ehci_ci_portpower) from [&lt;c0db4fa4&gt;] (ehci_port_power+0x50/0xa4)
[&lt;c0db4fa4&gt;] (ehci_port_power) from [&lt;c0db5420&gt;] (ehci_silence_controller+0x5c/0xc4)
[&lt;c0db5420&gt;] (ehci_silence_controller) from [&lt;c0db7644&gt;] (ehci_stop+0x3c/0xcc)
[&lt;c0db7644&gt;] (ehci_stop) from [&lt;c0d5bdc4&gt;] (usb_remove_hcd+0xe0/0x19c)
[&lt;c0d5bdc4&gt;] (usb_remove_hcd) from [&lt;c0df7638&gt;] (host_stop+0x38/0xa8)
[&lt;c0df7638&gt;] (host_stop) from [&lt;c0df2f34&gt;] (ci_hdrc_remove+0x44/0xe4)
...

Keeping track of the power enable state avoids the warning and traceback.

Fixes: c8679a2fb8dec ("usb: chipidea: host: add portpower override")
Cc: Michael Grzeschik &lt;m.grzeschik@pengutronix.de&gt;
Cc: Peter Chen &lt;peter.chen@freescale.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Acked-by: Peter Chen &lt;peter.chen@nxp.com&gt;
Link: https://lore.kernel.org/r/20191226155754.25451-1-linux@roeck-us.net
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: chipidea: Fix otg event handler</title>
<updated>2019-11-20T17:00:19+00:00</updated>
<author>
<name>Loic Poulain</name>
<email>loic.poulain@linaro.org</email>
</author>
<published>2018-09-04T15:18:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0407eece7ea1d27a3206f90dfbf30873c72cc3da'/>
<id>urn:sha1:0407eece7ea1d27a3206f90dfbf30873c72cc3da</id>
<content type='text'>
[ Upstream commit 59739131e0ca06db7560f9073fff2fb83f6bc2a5 ]

At OTG work running time, it's possible that several events need to be
addressed (e.g. ID and VBUS events). The current implementation handles
only one event at a time which leads to ignoring the other one. Fix it.

Signed-off-by: Loic Poulain &lt;loic.poulain@linaro.org&gt;
Signed-off-by: Peter Chen &lt;peter.chen@nxp.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>usb: chipidea: imx: enable OTG overcurrent in case USB subsystem is already started</title>
<updated>2019-11-20T17:00:18+00:00</updated>
<author>
<name>Nicolas Adell</name>
<email>nicolas.adell@actia.fr</email>
</author>
<published>2018-08-27T13:59:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c4d64f2d93e1f16c3d8efc3d95461f7f6dbdff65'/>
<id>urn:sha1:c4d64f2d93e1f16c3d8efc3d95461f7f6dbdff65</id>
<content type='text'>
[ Upstream commit 1dedbdf2bbb1ede8d96f35f9845ecae179dc1988 ]

When initializing the USB subsystem before starting the kernel,
OTG overcurrent detection is disabled. In case the OTG polarity of
overcurrent is low active, the overcurrent detection is never enabled
again and events cannot be reported as expected. Because imx usb
overcurrent polarity is low active by default, only detection needs
to be enable in usbmisc init function.

Signed-off-by: Nicolas Adell &lt;nicolas.adell@actia.fr&gt;
Signed-off-by: Peter Chen &lt;peter.chen@nxp.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>usb: chipidea: udc: don't do hardware access if gadget has stopped</title>
<updated>2019-09-06T08:20:56+00:00</updated>
<author>
<name>Peter Chen</name>
<email>peter.chen@nxp.com</email>
</author>
<published>2019-08-20T02:07:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2590118de92bb3cb7dcedc633f853681d6aac7ef'/>
<id>urn:sha1:2590118de92bb3cb7dcedc633f853681d6aac7ef</id>
<content type='text'>
commit cbe85c88ce80fb92956a0793518d415864dcead8 upstream.

After _gadget_stop_activity is executed, we can consider the hardware
operation for gadget has finished, and the udc can be stopped and enter
low power mode. So, any later hardware operations (from usb_ep_ops APIs
or usb_gadget_ops APIs) should be considered invalid, any deinitializatons
has been covered at _gadget_stop_activity.

I meet this problem when I plug out usb cable from PC using mass_storage
gadget, my callstack like: vbus interrupt-&gt;.vbus_session-&gt;
composite_disconnect -&gt;pm_runtime_put_sync(&amp;_gadget-&gt;dev),
the composite_disconnect will call fsg_disable, but fsg_disable calls
usb_ep_disable using async way, there are register accesses for
usb_ep_disable. So sometimes, I get system hang due to visit register
without clock, sometimes not.

The Linux Kernel USB maintainer Alan Stern suggests this kinds of solution.
See: http://marc.info/?l=linux-usb&amp;m=138541769810983&amp;w=2.

Cc: &lt;stable@vger.kernel.org&gt; #v4.9+
Signed-off-by: Peter Chen &lt;peter.chen@nxp.com&gt;
Link: https://lore.kernel.org/r/20190820020503.27080-2-peter.chen@nxp.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: chipidea: udc: workaround for endpoint conflict issue</title>
<updated>2019-06-25T03:36:50+00:00</updated>
<author>
<name>Peter Chen</name>
<email>peter.chen@nxp.com</email>
</author>
<published>2019-06-17T01:49:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2c4e24a69a88f0c8293136fa472f812791a66f56'/>
<id>urn:sha1:2c4e24a69a88f0c8293136fa472f812791a66f56</id>
<content type='text'>
commit c19dffc0a9511a7d7493ec21019aefd97e9a111b upstream.

An endpoint conflict occurs when the USB is working in device mode
during an isochronous communication. When the endpointA IN direction
is an isochronous IN endpoint, and the host sends an IN token to
endpointA on another device, then the OUT transaction may be missed
regardless the OUT endpoint number. Generally, this occurs when the
device is connected to the host through a hub and other devices are
connected to the same hub.

The affected OUT endpoint can be either control, bulk, isochronous, or
an interrupt endpoint. After the OUT endpoint is primed, if an IN token
to the same endpoint number on another device is received, then the OUT
endpoint may be unprimed (cannot be detected by software), which causes
this endpoint to no longer respond to the host OUT token, and thus, no
corresponding interrupt occurs.

There is no good workaround for this issue, the only thing the software
could do is numbering isochronous IN from the highest endpoint since we
have observed most of device number endpoint from the lowest.

Cc: &lt;stable@vger.kernel.org&gt; #v3.14+
Cc: Fabio Estevam &lt;festevam@gmail.com&gt;
Cc: Greg KH &lt;gregkh@linuxfoundation.org&gt;
Cc: Sergei Shtylyov &lt;sergei.shtylyov@cogentembedded.com&gt;
Cc: Jun Li &lt;jun.li@nxp.com&gt;
Signed-off-by: Peter Chen &lt;peter.chen@nxp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: chipidea: Grab the (legacy) USB PHY by phandle first</title>
<updated>2019-04-05T20:31:29+00:00</updated>
<author>
<name>Paul Kocialkowski</name>
<email>paul.kocialkowski@bootlin.com</email>
</author>
<published>2019-02-27T06:51:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=52eec5bfe194eee53f28ace3a60121a4727c3f8d'/>
<id>urn:sha1:52eec5bfe194eee53f28ace3a60121a4727c3f8d</id>
<content type='text'>
[ Upstream commit 68ef236274793066b9ba3154b16c0acc1c891e5c ]

According to the chipidea driver bindings, the USB PHY is specified via
the "phys" phandle node. However, this only takes effect for USB PHYs
that use the common PHY framework. For legacy USB PHYs, a simple lookup
based on the USB PHY type is done instead.

This does not play out well when more than one USB PHY is registered,
since the first registered PHY matching the type will always be
returned regardless of what the driver was bound to.

Fix this by looking up the PHY based on the "phys" phandle node.
Although generic PHYs are rather matched by their "phys-name" and not
the "phys" phandle directly, there is no helper for similar lookup on
legacy PHYs and it's probably not worth the effort to add it.

When no legacy USB PHY is found by phandle, fallback to grabbing any
registered USB2 PHY. This ensures backward compatibility if some users
were actually relying on this mechanism.

Signed-off-by: Paul Kocialkowski &lt;paul.kocialkowski@bootlin.com&gt;
Signed-off-by: Peter Chen &lt;peter.chen@nxp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
</feed>
