<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/usb/chipidea, branch v5.4.50</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.4.50</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.4.50'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2020-05-14T05:58:25+00:00</updated>
<entry>
<title>usb: chipidea: msm: Ensure proper controller reset using role switch API</title>
<updated>2020-05-14T05:58:25+00:00</updated>
<author>
<name>Bryan O'Donoghue</name>
<email>bryan.odonoghue@linaro.org</email>
</author>
<published>2020-05-07T00:49:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4f4dc27c09cdb287320178d52d0516d2a4acb56f'/>
<id>urn:sha1:4f4dc27c09cdb287320178d52d0516d2a4acb56f</id>
<content type='text'>
commit 91edf63d5022bd0464788ffb4acc3d5febbaf81d upstream.

Currently we check to make sure there is no error state on the extcon
handle for VBUS when writing to the HS_PHY_GENCONFIG_2 register. When using
the USB role-switch API we still need to write to this register absent an
extcon handle.

This patch makes the appropriate update to ensure the write happens if
role-switching is true.

Fixes: 05559f10ed79 ("usb: chipidea: add role switch class support")
Cc: stable &lt;stable@vger.kernel.org&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Philipp Zabel &lt;p.zabel@pengutronix.de&gt;
Cc: linux-usb@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Stephen Boyd &lt;swboyd@chromium.org&gt;
Signed-off-by: Bryan O'Donoghue &lt;bryan.odonoghue@linaro.org&gt;
Signed-off-by: Peter Chen &lt;peter.chen@nxp.com&gt;
Link: https://lore.kernel.org/r/20200507004918.25975-2-peter.chen@kernel.org
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: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>Merge tag 'usb-ci-v5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-next</title>
<updated>2019-09-05T08:02:07+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2019-09-05T08:02:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fb9617edf6c0e1b86a6595cd92dd3f84595221d9'/>
<id>urn:sha1:fb9617edf6c0e1b86a6595cd92dd3f84595221d9</id>
<content type='text'>
Peter writes:

Add role switch class support for chipidea

* tag 'usb-ci-v5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb:
  usb: chipidea: msm: Use device-managed registration API
  usb: chipidea: add role switch class support
  dt-binding: usb: usbmisc-imx: add imx7ulp compatible
  dt-binding: usb: ci-hdrc-usb2: add imx7ulp compatible
</content>
</entry>
<entry>
<title>usb: chipidea: msm: Use device-managed registration API</title>
<updated>2019-09-03T13:53:27+00:00</updated>
<author>
<name>Chuhong Yuan</name>
<email>hslester96@gmail.com</email>
</author>
<published>2019-09-02T01:43:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d7290cd04b4ede9cccc0cf1b72ee856fdf46cf8b'/>
<id>urn:sha1:d7290cd04b4ede9cccc0cf1b72ee856fdf46cf8b</id>
<content type='text'>
Use devm_reset_controller_register to get rid
of manual unregistration.

Signed-off-by: Chuhong Yuan &lt;hslester96@gmail.com&gt;
Link: https://lore.kernel.org/r/20190902014323.27588-1-hslester96@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: chipidea: msm: Use device-managed registration API</title>
<updated>2019-09-03T06:16:40+00:00</updated>
<author>
<name>Chuhong Yuan</name>
<email>hslester96@gmail.com</email>
</author>
<published>2019-09-02T01:43:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ecd55e367f3d706788632e176ec6b94e1a72a07c'/>
<id>urn:sha1:ecd55e367f3d706788632e176ec6b94e1a72a07c</id>
<content type='text'>
Use devm_reset_controller_register to get rid
of manual unregistration.

Signed-off-by: Chuhong Yuan &lt;hslester96@gmail.com&gt;
Signed-off-by: Peter Chen &lt;peter.chen@nxp.com&gt;
</content>
</entry>
<entry>
<title>Merge 5.3-rc7 into usb-next</title>
<updated>2019-09-02T17:31:18+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2019-09-02T17:31:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7a81146204859c6f8d8daf3ab7a25af17dfecd5f'/>
<id>urn:sha1:7a81146204859c6f8d8daf3ab7a25af17dfecd5f</id>
<content type='text'>
We need the usb fixes in here for testing

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: chipidea: add role switch class support</title>
<updated>2019-08-28T02:39:53+00:00</updated>
<author>
<name>Li Jun</name>
<email>jun.li@nxp.com</email>
</author>
<published>2019-08-26T10:25:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=05559f10ed797b79f7fa47313682c48919a2b111'/>
<id>urn:sha1:05559f10ed797b79f7fa47313682c48919a2b111</id>
<content type='text'>
USB role is fully controlled by usb role switch consumer(e.g. typec),
usb port can be at host mode(USB_ROLE_HOST), device mode connected to
host(USB_ROLE_DEVICE), or not connecting any partner(USB_ROLE_NONE).

Signed-off-by: Li Jun &lt;jun.li@nxp.com&gt;
Signed-off-by: Peter Chen &lt;peter.chen@nxp.com&gt;
</content>
</entry>
<entry>
<title>usb: chipidea: udc: don't do hardware access if gadget has stopped</title>
<updated>2019-08-21T16:45:49+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=cbe85c88ce80fb92956a0793518d415864dcead8'/>
<id>urn:sha1:cbe85c88ce80fb92956a0793518d415864dcead8</id>
<content type='text'>
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>Merge 5.3-rc5 into usb-next</title>
<updated>2019-08-19T05:15:42+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2019-08-19T05:15:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7ffc95e90e305c6803991ec2a2f4e442236efc77'/>
<id>urn:sha1:7ffc95e90e305c6803991ec2a2f4e442236efc77</id>
<content type='text'>
We need the usb fixes in here as well for other patches to build on.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: chipidea: imx: fix EPROBE_DEFER support during driver probe</title>
<updated>2019-08-15T12:50:21+00:00</updated>
<author>
<name>André Draszik</name>
<email>git@andred.net</email>
</author>
<published>2019-08-10T15:07:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=141822aa3f79efc8a2ec3ed464f2fd2c93ccd803'/>
<id>urn:sha1:141822aa3f79efc8a2ec3ed464f2fd2c93ccd803</id>
<content type='text'>
If driver probe needs to be deferred, e.g. because ci_hdrc_add_device()
isn't ready yet, this driver currently misbehaves badly:
    a) success is still reported to the driver core (meaning a 2nd
       probe attempt will never be done), leaving the driver in
       a dysfunctional state and the hardware unusable

    b) driver remove / shutdown OOPSes:
    [  206.786916] Unable to handle kernel paging request at virtual address fffffdff
    [  206.794148] pgd = 880b9f82
    [  206.796890] [fffffdff] *pgd=abf5e861, *pte=00000000, *ppte=00000000
    [  206.803179] Internal error: Oops: 37 [#1] PREEMPT SMP ARM
    [  206.808581] Modules linked in: wl18xx evbug
    [  206.813308] CPU: 1 PID: 1 Comm: systemd-shutdow Not tainted 4.19.35+gf345c93b4195 #1
    [  206.821053] Hardware name: Freescale i.MX7 Dual (Device Tree)
    [  206.826813] PC is at ci_hdrc_remove_device+0x4/0x20
    [  206.831699] LR is at ci_hdrc_imx_remove+0x20/0xe8
    [  206.836407] pc : [&lt;805cd4b0&gt;]    lr : [&lt;805d62cc&gt;]    psr: 20000013
    [  206.842678] sp : a806be40  ip : 00000001  fp : 80adbd3c
    [  206.847906] r10: 80b1b794  r9 : 80d5dfe0  r8 : a8192c44
    [  206.853136] r7 : 80db93a0  r6 : a8192c10  r5 : a8192c00  r4 : a93a4a00
    [  206.859668] r3 : 00000000  r2 : a8192ce4  r1 : ffffffff  r0 : fffffdfb
    [  206.866201] Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
    [  206.873341] Control: 10c5387d  Table: a9e0c06a  DAC: 00000051
    [  206.879092] Process systemd-shutdow (pid: 1, stack limit = 0xb271353c)
    [  206.885624] Stack: (0xa806be40 to 0xa806c000)
    [  206.889992] be40: a93a4a00 805d62cc a8192c1c a8170e10 a8192c10 8049a490 80d04d08 00000000
    [  206.898179] be60: 00000000 80d0da2c fee1dead 00000000 a806a000 00000058 00000000 80148b08
    [  206.906366] be80: 01234567 80148d8c a9858600 00000000 00000000 00000000 00000000 80d04d08
    [  206.914553] bea0: 00000000 00000000 a82741e0 a9858600 00000024 00000002 a9858608 00000005
    [  206.922740] bec0: 0000001e 8022c058 00000000 00000000 a806bf14 a9858600 00000000 a806befc
    [  206.930927] bee0: a806bf78 00000000 7ee12c30 8022c18c a806bef8 a806befc 00000000 00000001
    [  206.939115] bf00: 00000000 00000024 a806bf14 00000005 7ee13b34 7ee12c68 00000004 7ee13f20
    [  206.947302] bf20: 00000010 7ee12c7c 00000005 7ee12d04 0000000a 76e7dc00 00000001 80d0f140
    [  206.955490] bf40: ab637880 a974de40 60000013 80d0f140 ab6378a0 80d04d08 a8080470 a9858600
    [  206.963677] bf60: a9858600 00000000 00000000 8022c24c 00000000 80144310 00000000 00000000
    [  206.971864] bf80: 80101204 80d04d08 00000000 80d04d08 00000000 00000000 00000003 00000058
    [  206.980051] bfa0: 80101204 80101000 00000000 00000000 fee1dead 28121969 01234567 00000000
    [  206.988237] bfc0: 00000000 00000000 00000003 00000058 00000000 00000000 00000000 00000000
    [  206.996425] bfe0: 0049ffb0 7ee13d58 0048a84b 76f245a6 60000030 fee1dead 00000000 00000000
    [  207.004622] [&lt;805cd4b0&gt;] (ci_hdrc_remove_device) from [&lt;805d62cc&gt;] (ci_hdrc_imx_remove+0x20/0xe8)
    [  207.013509] [&lt;805d62cc&gt;] (ci_hdrc_imx_remove) from [&lt;8049a490&gt;] (device_shutdown+0x16c/0x218)
    [  207.022050] [&lt;8049a490&gt;] (device_shutdown) from [&lt;80148b08&gt;] (kernel_restart+0xc/0x50)
    [  207.029980] [&lt;80148b08&gt;] (kernel_restart) from [&lt;80148d8c&gt;] (sys_reboot+0xf4/0x1f0)
    [  207.037648] [&lt;80148d8c&gt;] (sys_reboot) from [&lt;80101000&gt;] (ret_fast_syscall+0x0/0x54)
    [  207.045308] Exception stack(0xa806bfa8 to 0xa806bff0)
    [  207.050368] bfa0:                   00000000 00000000 fee1dead 28121969 01234567 00000000
    [  207.058554] bfc0: 00000000 00000000 00000003 00000058 00000000 00000000 00000000 00000000
    [  207.066737] bfe0: 0049ffb0 7ee13d58 0048a84b 76f245a6
    [  207.071799] Code: ebffffa8 e3a00000 e8bd8010 e92d4010 (e5904004)
    [  207.078021] ---[ end trace be47424e3fd46e9f ]---
    [  207.082647] Kernel panic - not syncing: Fatal exception
    [  207.087894] ---[ end Kernel panic - not syncing: Fatal exception ]---

    c) the error path in combination with driver removal causes
       imbalanced calls to the clk_*() and pm_()* APIs

a) happens because the original intended return value is
   overwritten (with 0) by the return code of
   regulator_disable() in ci_hdrc_imx_probe()'s error path
b) happens because ci_pdev is -EPROBE_DEFER, which causes
   ci_hdrc_remove_device() to OOPS

Fix a) by being more careful in ci_hdrc_imx_probe()'s error
path and not overwriting the real error code

Fix b) by calling the respective cleanup functions during
remove only when needed (when ci_pdev != NULL, i.e. when
everything was initialised correctly). This also has the
side effect of not causing imbalanced clk_*() and pm_*()
API calls as part of the error code path.

Fixes: 7c8e8909417e ("usb: chipidea: imx: add HSIC support")
Signed-off-by: André Draszik &lt;git@andred.net&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
CC: Peter Chen &lt;Peter.Chen@nxp.com&gt;
CC: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
CC: Shawn Guo &lt;shawnguo@kernel.org&gt;
CC: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
CC: Pengutronix Kernel Team &lt;kernel@pengutronix.de&gt;
CC: Fabio Estevam &lt;festevam@gmail.com&gt;
CC: NXP Linux Team &lt;linux-imx@nxp.com&gt;
CC: linux-usb@vger.kernel.org
CC: linux-arm-kernel@lists.infradead.org
CC: linux-kernel@vger.kernel.org
Link: https://lore.kernel.org/r/20190810150758.17694-1-git@andred.net
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
