<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/usb/chipidea/core.c, branch v6.1.168</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.168</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.168'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-01-25T23:27:40+00:00</updated>
<entry>
<title>usb: chipidea: wait controller resume finished for wakeup irq</title>
<updated>2024-01-25T23:27:40+00:00</updated>
<author>
<name>Xu Yang</name>
<email>xu.yang_2@nxp.com</email>
</author>
<published>2023-12-28T11:07:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e894b1b038abad80311b2dfcccd5b72ba3b38708'/>
<id>urn:sha1:e894b1b038abad80311b2dfcccd5b72ba3b38708</id>
<content type='text'>
commit 128d849074d05545becf86e713715ce7676fc074 upstream.

After the chipidea driver introduce extcon for id and vbus, it's able
to wakeup from another irq source, in case the system with extcon ID
cable, wakeup from usb ID cable and device removal, the usb device
disconnect irq may come firstly before the extcon notifier while system
resume, so we will get 2 "wakeup" irq, one for usb device disconnect;
and one for extcon ID cable change(real wakeup event), current driver
treat them as 2 successive wakeup irq so can't handle it correctly, then
finally the usb irq can't be enabled. This patch adds a check to bypass
further usb events before controller resume finished to fix it.

Fixes: 1f874edcb731 ("usb: chipidea: add runtime power management support")
cc:  &lt;stable@vger.kernel.org&gt;
Acked-by: Peter Chen &lt;peter.chen@kernel.org&gt;
Signed-off-by: Xu Yang &lt;xu.yang_2@nxp.com&gt;
Signed-off-by: Li Jun &lt;jun.li@nxp.com&gt;
Link: https://lore.kernel.org/r/20231228110753.1755756-2-xu.yang_2@nxp.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: chipidea: add workaround for chipidea PEC bug</title>
<updated>2023-09-23T09:11:07+00:00</updated>
<author>
<name>Xu Yang</name>
<email>xu.yang_2@nxp.com</email>
</author>
<published>2023-08-09T02:44:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=91f400233edc1354e80b9f6b9370dc1d0e11095b'/>
<id>urn:sha1:91f400233edc1354e80b9f6b9370dc1d0e11095b</id>
<content type='text'>
[ Upstream commit 12e6ac69cc7e7d3367599ae26a92a0f9a18bc728 ]

Some NXP processors using ChipIdea USB IP have a bug when frame babble is
detected.

Issue description:
In USB camera test, our controller is host in HS mode. In ISOC IN, when
device sends data across the micro frame, it causes the babble in host
controller. This will clear the PE bit. In spec, it also requires to set
the PEC bit and then set the PCI bit. Without the PCI interrupt, the
software does not know the PE is cleared.

This will add a flag CI_HDRC_HAS_PORTSC_PEC_MISSED to some impacted
platform datas. And the ehci host driver will assert PEC by SW when
specific conditions are satisfied.

Signed-off-by: Xu Yang &lt;xu.yang_2@nxp.com&gt;
Link: https://lore.kernel.org/r/20230809024432.535160-2-xu.yang_2@nxp.com
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: fix missing goto in `ci_hdrc_probe`</title>
<updated>2023-05-11T14:03:30+00:00</updated>
<author>
<name>Yinhao Hu</name>
<email>dddddd@hust.edu.cn</email>
</author>
<published>2023-04-12T05:58:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=17993a13b5f654070f63b3dd36099a94e52118d8'/>
<id>urn:sha1:17993a13b5f654070f63b3dd36099a94e52118d8</id>
<content type='text'>
[ Upstream commit d6f712f53b79f5017cdcefafb7a5aea9ec52da5d ]

From the comment of ci_usb_phy_init, it returns an error code if
usb_phy_init has failed, and it should do some clean up, not just
return directly.

Fix this by goto the error handling.

Fixes: 74475ede784d ("usb: chipidea: move PHY operation to core")
Reviewed-by: Dongliang Mu &lt;dzm91@hust.edu.cn&gt;
Acked-by: Peter Chen &lt;peter.chen@kernel.org&gt;
Signed-off-by: Yinhao Hu &lt;dddddd@hust.edu.cn&gt;
Link: https://lore.kernel.org/r/20230412055852.971991-1-dddddd@hust.edu.cn
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: core: fix possible concurrent when switch role</title>
<updated>2023-03-30T10:49:24+00:00</updated>
<author>
<name>Xu Yang</name>
<email>xu.yang_2@nxp.com</email>
</author>
<published>2023-03-17T06:15:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4c1a06454f00ce3190ce78322cf05d54980f80e5'/>
<id>urn:sha1:4c1a06454f00ce3190ce78322cf05d54980f80e5</id>
<content type='text'>
commit 451b15ed138ec15bffbebb58a00ebdd884c3e659 upstream.

The user may call role_store() when driver is handling
ci_handle_id_switch() which is triggerred by otg event or power lost
event. Unfortunately, the controller may go into chaos in this case.
Fix this by protecting it with mutex lock.

Fixes: a932a8041ff9 ("usb: chipidea: core: add sysfs group")
cc: &lt;stable@vger.kernel.org&gt;
Acked-by: Peter Chen &lt;peter.chen@kernel.org&gt;
Signed-off-by: Xu Yang &lt;xu.yang_2@nxp.com&gt;
Link: https://lore.kernel.org/r/20230317061516.2451728-2-xu.yang_2@nxp.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: chipdea: core: fix return -EINVAL if request role is the same with current role</title>
<updated>2023-03-30T10:49:24+00:00</updated>
<author>
<name>Xu Yang</name>
<email>xu.yang_2@nxp.com</email>
</author>
<published>2023-03-17T06:15:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4e3498143863f75ecbd3d06012ed30564cbe67a0'/>
<id>urn:sha1:4e3498143863f75ecbd3d06012ed30564cbe67a0</id>
<content type='text'>
commit 3670de80678961eda7fa2220883fc77c16868951 upstream.

It should not return -EINVAL if the request role is the same with current
role, return non-error and without do anything instead.

Fixes: a932a8041ff9 ("usb: chipidea: core: add sysfs group")
cc: &lt;stable@vger.kernel.org&gt;
Acked-by: Peter Chen &lt;peter.chen@kernel.org&gt;
Signed-off-by: Xu Yang &lt;xu.yang_2@nxp.com&gt;
Link: https://lore.kernel.org/r/20230317061516.2451728-1-xu.yang_2@nxp.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: chipidea: udc: implement get_frame</title>
<updated>2022-06-21T14:40:51+00:00</updated>
<author>
<name>Michael Grzeschik</name>
<email>m.grzeschik@pengutronix.de</email>
</author>
<published>2022-06-16T19:44:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8709115180c612bd8e6686a7b6c6fe94e5b51cdc'/>
<id>urn:sha1:8709115180c612bd8e6686a7b6c6fe94e5b51cdc</id>
<content type='text'>
The chipidea udc core is capable of reading the current frame index from
hardware. This patch adds the get_frame callback to the driver.

Acked-by: Peter Chen &lt;peter.chen@kernel.org&gt;
Signed-off-by: Michael Grzeschik &lt;m.grzeschik@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20220616194459.2981519-1-m.grzeschik@pengutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: chipidea: Set the DT node on the child device</title>
<updated>2021-12-17T15:52:27+00:00</updated>
<author>
<name>Rob Herring</name>
<email>robh@kernel.org</email>
</author>
<published>2021-12-15T22:56:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0f153a1b8193ce768be4df0400aeb2c8f2a3b3da'/>
<id>urn:sha1:0f153a1b8193ce768be4df0400aeb2c8f2a3b3da</id>
<content type='text'>
The ChipIdea glue drivers just copy the glue resources to the "ci_hdrc"
child device. Instead, set the child device's DT node pointer to the
parent device's node so that platform_get_irq() can find the IRQ
resources in the DT. This removes the need for statically populating the
IRQ resources from the DT which has been deprecated for some time.

Acked-by: Peter Chen &lt;peter.chen@kernel.org&gt;
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Link: https://lore.kernel.org/r/20211215225646.1997946-1-robh@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: chipidea: fix interrupt deadlock</title>
<updated>2021-10-22T09:14:12+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=9aaa81c3366e8393a62374e3a1c67c69edc07b8a'/>
<id>urn:sha1:9aaa81c3366e8393a62374e3a1c67c69edc07b8a</id>
<content type='text'>
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: core: Fix incorrectly documented function 'ci_usb_phy_exit()'</title>
<updated>2021-05-27T07:43:44+00:00</updated>
<author>
<name>Lee Jones</name>
<email>lee.jones@linaro.org</email>
</author>
<published>2021-05-26T13:00:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b1f562f1c40151ae59c7b81ae6e361777ad31989'/>
<id>urn:sha1:b1f562f1c40151ae59c7b81ae6e361777ad31989</id>
<content type='text'>
Fixes the following W=1 kernel build warning(s):

 drivers/usb/chipidea/core.c:343: warning: expecting prototype for _ci_usb_phy_exit(). Prototype was for ci_usb_phy_exit() instead

Cc: Peter Chen &lt;peter.chen@kernel.org&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Liam Girdwood &lt;lgirdwood@gmail.com&gt;
Cc: Mark Brown &lt;broonie@kernel.org&gt;
Cc: David Lopo &lt;dlopo@chipidea.mips.com&gt;
Cc: linux-usb@vger.kernel.org
Acked-by: Peter Chen &lt;peter.chen@kernel.org&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Link: https://lore.kernel.org/r/20210526130037.856068-14-lee.jones@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: chipidea: tegra: Support host mode</title>
<updated>2021-01-13T10:26:34+00:00</updated>
<author>
<name>Peter Geis</name>
<email>pgwipeout@gmail.com</email>
</author>
<published>2020-12-18T12:02:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fc53d5279094e38e6363506339772a7021da2df8'/>
<id>urn:sha1:fc53d5279094e38e6363506339772a7021da2df8</id>
<content type='text'>
Add USB host mode to the Tegra HDRC driver. This allows us to benefit from
support provided by the generic ChipIdea driver instead of duplicating the
effort in a separate ehci-tegra driver.

Tested-by: Matt Merhar &lt;mattmerhar@protonmail.com&gt;
Tested-by: Nicolas Chauvet &lt;kwizart@gmail.com&gt;
Tested-by: Ion Agorria &lt;ion@agorria.com&gt;
Acked-by: Thierry Reding &lt;treding@nvidia.com&gt;
Acked-by: Peter Chen &lt;peter.chen@kernel.org&gt;
Signed-off-by: Peter Geis &lt;pgwipeout@gmail.com&gt;
Signed-off-by: Dmitry Osipenko &lt;digetx@gmail.com&gt;
Link: https://lore.kernel.org/r/20201218120246.7759-6-digetx@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
