<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/usb/chipidea/host.c, branch v5.4.151</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.4.151</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.4.151'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2021-09-22T10:26:33+00:00</updated>
<entry>
<title>usb: chipidea: host: fix port index underflow and UBSAN complains</title>
<updated>2021-09-22T10:26:33+00:00</updated>
<author>
<name>Li Jun</name>
<email>jun.li@nxp.com</email>
</author>
<published>2021-06-18T08:28:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a18cfd715e91d2013da3dac86ce18f34a25d9e64'/>
<id>urn:sha1:a18cfd715e91d2013da3dac86ce18f34a25d9e64</id>
<content type='text'>
[ Upstream commit e5d6a7c6cfae9e714a0e8ff64facd1ac68a784c6 ]

If wIndex is 0 (and it often is), these calculations underflow and
UBSAN complains, here resolve this by not decrementing the index when
it is equal to 0, this copies the solution from commit 85e3990bea49
("USB: EHCI: avoid undefined pointer arithmetic and placate UBSAN")

Reported-by: Zhipeng Wang &lt;zhipeng.wang_1@nxp.com&gt;
Signed-off-by: Li Jun &lt;jun.li@nxp.com&gt;
Link: https://lore.kernel.org/r/1624004938-2399-1-git-send-email-jun.li@nxp.com
Signed-off-by: Peter Chen &lt;peter.chen@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>usb: chipidea: host: Disable port power only if previously enabled</title>
<updated>2020-01-14T19:08:19+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=b5c477d904eb179cbaf82b9e263b011f65ee249b'/>
<id>urn:sha1:b5c477d904eb179cbaf82b9e263b011f65ee249b</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: host: override ehci-&gt;hub_control</title>
<updated>2018-12-11T01:12:30+00:00</updated>
<author>
<name>Peter Chen</name>
<email>peter.chen@nxp.com</email>
</author>
<published>2018-10-16T02:11:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2c4593ecc920b6f3c148f2d123a5c6aa2f1f3e73'/>
<id>urn:sha1:2c4593ecc920b6f3c148f2d123a5c6aa2f1f3e73</id>
<content type='text'>
The chipidea controller has some special requirements during
suspend/resume, override common ehci-&gt;hub_control to implement
it.

Reviewed-by: Frieder Schrempf &lt;frieder.schrempf@kontron.de&gt;
Tested-by: Frieder Schrempf &lt;frieder.schrempf@kontron.de&gt;
Signed-off-by: Peter Chen &lt;peter.chen@nxp.com&gt;
</content>
</entry>
<entry>
<title>usb: chipidea: add flag for imx hsic implementation</title>
<updated>2018-12-11T01:12:29+00:00</updated>
<author>
<name>Peter Chen</name>
<email>peter.chen@nxp.com</email>
</author>
<published>2018-10-15T09:02:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=014abe34a9095daaa6cbb2693ee90bbb54674693'/>
<id>urn:sha1:014abe34a9095daaa6cbb2693ee90bbb54674693</id>
<content type='text'>
NXP (Freecale) imx HSIC design has some special requirements, add
some flags at host code to handle them.

Reviewed-by: Frieder Schrempf &lt;frieder.schrempf@kontron.de&gt;
Tested-by: Frieder Schrempf &lt;frieder.schrempf@kontron.de&gt;
Signed-off-by: Peter Chen &lt;peter.chen@nxp.com&gt;
</content>
</entry>
<entry>
<title>usb: chipidea: Add dynamic pinctrl selection</title>
<updated>2018-09-20T09:04:21+00:00</updated>
<author>
<name>Loic Poulain</name>
<email>loic.poulain@linaro.org</email>
</author>
<published>2018-09-04T15:18:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=16caf1fa37db4722d8d8c7bc26177279949d75a6'/>
<id>urn:sha1:16caf1fa37db4722d8d8c7bc26177279949d75a6</id>
<content type='text'>
Some hardware implementations require to configure pins differently
according to the USB role (host/device), this can be an update of the
pins routing or a simple GPIO value change.

This patch introduces new optional "host" and "device" pinctrls.
If these pinctrls are defined by the device, they are respectively
selected on host/device role start.

If a default pinctrl exist, it is restored on host/device role stop.

Signed-off-by: Loic Poulain &lt;loic.poulain@linaro.org&gt;
Signed-off-by: Peter Chen &lt;peter.chen@nxp.com&gt;
</content>
</entry>
<entry>
<title>usb: chipidea: host: fix disconnection detect issue</title>
<updated>2018-06-26T01:59:34+00:00</updated>
<author>
<name>Peter Chen</name>
<email>peter.chen@nxp.com</email>
</author>
<published>2018-06-06T01:43:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=90f26cc6bb90b35040f4da0347f480ea9df6e2fc'/>
<id>urn:sha1:90f26cc6bb90b35040f4da0347f480ea9df6e2fc</id>
<content type='text'>
The commit 4e88d4c08301 ("usb: add a flag to skip PHY
initialization to struct usb_hcd") delete the assignment
for hcd-&gt;usb_phy, it causes usb_phy_notify_connect{disconnect)
are not called, the USB PHY driver is not notified of hot plug
event, then the disconnection will not be detected by hardware.

Fixes: 4e88d4c08301 ("usb: add a flag to skip PHY initialization
	to struct usb_hcd")
Acked-by: Martin Blumenstingl &lt;martin.blumenstingl@googlemail.com&gt;
Reported-by: Mats Karrman &lt;mats.dev.list@gmail.com&gt;
Tested-by: Mats Karrman &lt;mats.dev.list@gmail.com&gt;
Signed-off-by: Peter Chen &lt;peter.chen@nxp.com&gt;
</content>
</entry>
<entry>
<title>usb: add a flag to skip PHY initialization to struct usb_hcd</title>
<updated>2018-03-09T17:43:52+00:00</updated>
<author>
<name>Martin Blumenstingl</name>
<email>martin.blumenstingl@googlemail.com</email>
</author>
<published>2018-03-03T21:43:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4e88d4c083016454f179686529ae65d70b933b58'/>
<id>urn:sha1:4e88d4c083016454f179686529ae65d70b933b58</id>
<content type='text'>
The USB HCD core driver parses the device-tree node for "phys" and
"usb-phys" properties. It also manages the power state of these PHYs
automatically.
However, drivers may opt-out of this behavior by setting "phy" or
"usb_phy" in struct usb_hcd to a non-null value. An example where this
is required is the "Qualcomm USB2 controller", implemented by the
chipidea driver. The hardware requires that the PHY is only powered on
after the "reset completed" event from the controller is received.

A follow-up patch will allow the USB HCD core driver to manage more than
one PHY. Add a new "skip_phy_initialization" bitflag to struct usb_hcd
so drivers can opt-out of any PHY management provided by the USB HCD
core driver.

This also updates the existing drivers so they use the new flag if they
want to opt out of the PHY management provided by the USB HCD core
driver. This means that for these drivers the new "multiple PHY"
handling (which will be added in a follow-up patch) will be disabled as
well.

Signed-off-by: Martin Blumenstingl &lt;martin.blumenstingl@googlemail.com&gt;
Acked-by: Peter Chen &lt;peter.chen@nxp.com&gt;
Tested-by: Neil Armstrong &lt;narmstrong@baylibre.con&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: chipidea: Remove redundant license text</title>
<updated>2017-11-07T14:45:01+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2017-11-06T14:37:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=51b751f112dcbb24b46051fe64c2ddbe8aa367ea'/>
<id>urn:sha1:51b751f112dcbb24b46051fe64c2ddbe8aa367ea</id>
<content type='text'>
Now that the SPDX tag is in all USB files, that identifies the license
in a specific and legally-defined manner.  So the extra GPL text wording
can be removed as it is no longer needed at all.

This is done on a quest to remove the 700+ different ways that files in
the kernel describe the GPL license text.  And there's unneeded stuff
like the address (sometimes incorrect) for the FSF which is never
needed.

No copyright headers or other non-license-description text was removed.

Cc: Thierry Reding &lt;thierry.reding@gmail.com&gt;
Cc: Jonathan Hunter &lt;jonathanh@nvidia.com&gt;
Acked-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: add SPDX identifiers to all remaining files in drivers/usb/</title>
<updated>2017-11-04T10:48:02+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2017-11-03T10:28:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/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: chipidea: use bus-&gt;sysdev for DMA configuration</title>
<updated>2017-03-23T07:20:21+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2017-03-13T02:18:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=aeb78cda51005fa00943e331c1fb47c6ad74015d'/>
<id>urn:sha1:aeb78cda51005fa00943e331c1fb47c6ad74015d</id>
<content type='text'>
Set the dma for chipidea from sysdev. This is inherited from its
parent node. Also, do not set dma mask for child as it is not required
now.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Sriram Dash &lt;sriram.dash@nxp.com&gt;
Acked-by: Peter Chen &lt;peter.chen@nxp.com&gt;
Signed-off-by: Mathias Nyman &lt;mathias.nyman@linux.intel.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>
</feed>
