<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/usb/chipidea, branch v4.19.112</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.19.112</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.19.112'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2020-01-14T19:06:58+00:00</updated>
<entry>
<title>usb: chipidea: host: Disable port power only if previously enabled</title>
<updated>2020-01-14T19:06:58+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=1b7d82175bf8ac8f692b2b1d1ab801afa8cf0c03'/>
<id>urn:sha1:1b7d82175bf8ac8f692b2b1d1ab801afa8cf0c03</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:47:07+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=92aeb3756c432aef63d461d451275eef7388a169'/>
<id>urn:sha1:92aeb3756c432aef63d461d451275eef7388a169</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:47:06+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=979f541851d9f5589ace7e47693c4f6bd5b9187e'/>
<id>urn:sha1:979f541851d9f5589ace7e47693c4f6bd5b9187e</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:22:15+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=a209827549da0724ad0b6a9dbdc6d4742d875ebb'/>
<id>urn:sha1:a209827549da0724ad0b6a9dbdc6d4742d875ebb</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:35:53+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=e6563039674d41b099837b3ce12756dea0adb9bf'/>
<id>urn:sha1:e6563039674d41b099837b3ce12756dea0adb9bf</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:33:01+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=6030bcc04735e4c02f0286f5981e22c4dfa21efa'/>
<id>urn:sha1:6030bcc04735e4c02f0286f5981e22c4dfa21efa</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>
<entry>
<title>usb: chipidea: tegra: Fix missed ci_hdrc_remove_device()</title>
<updated>2019-03-23T19:10:04+00:00</updated>
<author>
<name>Dmitry Osipenko</name>
<email>digetx@gmail.com</email>
</author>
<published>2019-02-24T15:36:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8415e718a06b96402c19efa03455e890502b8c39'/>
<id>urn:sha1:8415e718a06b96402c19efa03455e890502b8c39</id>
<content type='text'>
commit 563b9372f7ec57e44e8f9a8600c5107d7ffdd166 upstream.

The ChipIdea's platform device need to be unregistered on Tegra's driver
module removal.

Fixes: dfebb5f43a78827a ("usb: chipidea: Add support for Tegra20/30/114/124")
Signed-off-by: Dmitry Osipenko &lt;digetx@gmail.com&gt;
Acked-by: Peter Chen &lt;peter.chen@nxp.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: chipidea: Prevent unbalanced IRQ disable</title>
<updated>2018-11-13T19:08:36+00:00</updated>
<author>
<name>Loic Poulain</name>
<email>loic.poulain@linaro.org</email>
</author>
<published>2018-09-04T15:18:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=eb4a3faebfd113482ea3c266f7d30e13f7d56848'/>
<id>urn:sha1:eb4a3faebfd113482ea3c266f7d30e13f7d56848</id>
<content type='text'>
[ Upstream commit 8b97d73c4d72a2abf58f8e49062a7ee1e5f1334e ]

The ChipIdea IRQ is disabled before scheduling the otg work and
re-enabled on otg work completion. However if the job is already
scheduled we have to undo the effect of disable_irq int order to
balance the IRQ disable-depth value.

Fixes: be6b0c1bd0be ("usb: chipidea: using one inline function to cover queue work operations")
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;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge 4.18-rc7 into usb-next</title>
<updated>2018-07-30T08:04:58+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2018-07-30T08:04:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8a7b5d0f75f757fa88b0d17c19523161b27b8e80'/>
<id>urn:sha1:8a7b5d0f75f757fa88b0d17c19523161b27b8e80</id>
<content type='text'>
We want the USB fixes in here as well to handle merge issues.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'usb-ci-v4.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-next</title>
<updated>2018-07-28T12:55:31+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2018-07-28T12:55:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a465c94eb355007d211750bd39ac02b40c2c3ecf'/>
<id>urn:sha1:a465c94eb355007d211750bd39ac02b40c2c3ecf</id>
<content type='text'>
Peter writes:

One patch to enable USB Ethernet gadget at Tegra platforms
</content>
</entry>
</feed>
