<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/usb/musb, branch v5.10.257</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.10.257</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.10.257'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-08-28T14:22:56+00:00</updated>
<entry>
<title>usb: musb: omap2430: fix device leak at unbind</title>
<updated>2025-08-28T14:22:56+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2025-08-21T16:14:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c757f01dd055695d41b84f0fb29c2af4c62d0d64'/>
<id>urn:sha1:c757f01dd055695d41b84f0fb29c2af4c62d0d64</id>
<content type='text'>
[ Upstream commit 1473e9e7679bd4f5a62d1abccae894fb86de280f ]

Make sure to drop the reference to the control device taken by
of_find_device_by_node() during probe when the driver is unbound.

Fixes: 8934d3e4d0e7 ("usb: musb: omap2430: Don't use omap_get_control_dev()")
Cc: stable@vger.kernel.org	# 3.13
Cc: Roger Quadros &lt;rogerq@kernel.org&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Link: https://lore.kernel.org/r/20250724091910.21092-5-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
[ Removed populate_irqs-related goto changes ]
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>usb: musb: fix gadget state on disconnect</title>
<updated>2025-08-28T14:22:29+00:00</updated>
<author>
<name>Drew Hamilton</name>
<email>drew.hamilton@zetier.com</email>
</author>
<published>2025-07-01T15:41:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=63ad6583b0664d472e5e44b56bc3dd9e740612b7'/>
<id>urn:sha1:63ad6583b0664d472e5e44b56bc3dd9e740612b7</id>
<content type='text'>
commit 67a59f82196c8c4f50c83329f0577acfb1349b50 upstream.

When unplugging the USB cable or disconnecting a gadget in usb peripheral mode with
echo "" &gt; /sys/kernel/config/usb_gadget/&lt;your_gadget&gt;/UDC,
/sys/class/udc/musb-hdrc.0/state does not change from USB_STATE_CONFIGURED.

Testing on dwc2/3 shows they both update the state to USB_STATE_NOTATTACHED.

Add calls to usb_gadget_set_state in musb_g_disconnect and musb_gadget_stop
to fix both cases.

Fixes: 49401f4169c0 ("usb: gadget: introduce gadget state tracking")
Cc: stable@vger.kernel.org
Co-authored-by: Yehowshua Immanuel &lt;yehowshua.immanuel@twosixtech.com&gt;
Signed-off-by: Yehowshua Immanuel &lt;yehowshua.immanuel@twosixtech.com&gt;
Signed-off-by: Drew Hamilton &lt;drew.hamilton@zetier.com&gt;
Link: https://lore.kernel.org/r/20250701154126.8543-1-drew.hamilton@zetier.com
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>usb: musb: Add and use inline functions musb_{get,set}_state</title>
<updated>2025-08-28T14:22:29+00:00</updated>
<author>
<name>Paul Cercueil</name>
<email>paul@crapouillou.net</email>
</author>
<published>2022-10-26T18:26:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e2d8d3f3786b6f5cb67a34139d07be0b9307cf2a'/>
<id>urn:sha1:e2d8d3f3786b6f5cb67a34139d07be0b9307cf2a</id>
<content type='text'>
commit 21acc656a06e912341d9db66c67b58cc7ed071e7 upstream.

Instead of manipulating musb-&gt;xceiv-&gt;otg-&gt;state directly, use the newly
introduced musb_get_state() and musb_set_state() inline functions.

Later, these inline functions will be modified to get rid of the
musb-&gt;xceiv dependency, which prevents the musb code from using the
generic PHY subsystem.

Signed-off-by: Paul Cercueil &lt;paul@crapouillou.net&gt;
Link: https://lore.kernel.org/r/20221026182657.146630-2-paul@crapouillou.net
Stable-dep-of: 67a59f82196c ("usb: musb: fix gadget state on disconnect")
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>usb: musb: sunxi: Fix accessing an released usb phy</title>
<updated>2024-11-17T13:59:38+00:00</updated>
<author>
<name>Zijun Hu</name>
<email>quic_zijuhu@quicinc.com</email>
</author>
<published>2024-10-29T15:13:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6e2848d1c8c0139161e69ac0a94133e90e9988e8'/>
<id>urn:sha1:6e2848d1c8c0139161e69ac0a94133e90e9988e8</id>
<content type='text'>
commit 498dbd9aea205db9da674994b74c7bf8e18448bd upstream.

Commit 6ed05c68cbca ("usb: musb: sunxi: Explicitly release USB PHY on
exit") will cause that usb phy @glue-&gt;xceiv is accessed after released.

1) register platform driver @sunxi_musb_driver
// get the usb phy @glue-&gt;xceiv
sunxi_musb_probe() -&gt; devm_usb_get_phy().

2) register and unregister platform driver @musb_driver
musb_probe() -&gt; sunxi_musb_init()
use the phy here
//the phy is released here
musb_remove() -&gt; sunxi_musb_exit() -&gt; devm_usb_put_phy()

3) register @musb_driver again
musb_probe() -&gt; sunxi_musb_init()
use the phy here but the phy has been released at 2).
...

Fixed by reverting the commit, namely, removing devm_usb_put_phy()
from sunxi_musb_exit().

Fixes: 6ed05c68cbca ("usb: musb: sunxi: Explicitly release USB PHY on exit")
Cc: stable@vger.kernel.org
Signed-off-by: Zijun Hu &lt;quic_zijuhu@quicinc.com&gt;
Link: https://lore.kernel.org/r/20241029-sunxi_fix-v1-1-9431ed2ab826@quicinc.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: musb: da8xx: fix a resource leak in probe()</title>
<updated>2024-07-05T07:12:53+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@linaro.org</email>
</author>
<published>2024-06-17T09:31:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=621e90201c84b8fc427c433738a11495d05422d0'/>
<id>urn:sha1:621e90201c84b8fc427c433738a11495d05422d0</id>
<content type='text'>
commit de644a4a86be04ed8a43ef8267d0f7d021941c5e upstream.

Call usb_phy_generic_unregister() if of_platform_populate() fails.

Fixes: d6299b6efbf6 ("usb: musb: Add support of CPPI 4.1 DMA controller to DA8xx")
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
Link: https://lore.kernel.org/r/69af1b1d-d3f4-492b-bcea-359ca5949f30@moroto.mountain
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: musb: Modify the "HWVers" register address</title>
<updated>2023-10-25T09:54:15+00:00</updated>
<author>
<name>Xingxing Luo</name>
<email>xingxing.luo@unisoc.com</email>
</author>
<published>2023-09-22T07:59:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=aadbf612f8b14984c7f7eacbdf05dab812b36f89'/>
<id>urn:sha1:aadbf612f8b14984c7f7eacbdf05dab812b36f89</id>
<content type='text'>
commit 6658a62e1ddf726483cb2d8bf45ea3f9bd533074 upstream.

musb HWVers rgister address is not 0x69, if we operate the
wrong address 0x69, it will cause a kernel crash, because
there is no register corresponding to this address in the
additional control register of musb. In fact, HWVers has
been defined in musb_register.h, and the name is
"MUSB_HWVERS", so We need to use this macro instead of 0x69.

Fixes: c2365ce5d5a0 ("usb: musb: replace hard coded registers with defines")
Cc: stable@vger.kernel.org
Signed-off-by: Xingxing Luo &lt;xingxing.luo@unisoc.com&gt;
Link: https://lore.kernel.org/r/20230922075929.31074-1-xingxing.luo@unisoc.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: musb: Get the musb_qh poniter after musb_giveback</title>
<updated>2023-10-25T09:54:15+00:00</updated>
<author>
<name>Xingxing Luo</name>
<email>xingxing.luo@unisoc.com</email>
</author>
<published>2023-09-19T03:30:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bc929a0052c43a626112e1724e72691e4e54be56'/>
<id>urn:sha1:bc929a0052c43a626112e1724e72691e4e54be56</id>
<content type='text'>
commit 33d7e37232155aadebe4145dcc592f00dabd7a2b upstream.

When multiple threads are performing USB transmission, musb-&gt;lock will be
unlocked when musb_giveback is executed. At this time, qh may be released
in the dequeue process in other threads, resulting in a wild pointer, so
it needs to be here get qh again, and judge whether qh is NULL, and when
dequeue, you need to set qh to NULL.

Fixes: dbac5d07d13e ("usb: musb: host: don't start next rx urb if current one failed")
Cc: stable@vger.kernel.org
Signed-off-by: Xingxing Luo &lt;xingxing.luo@unisoc.com&gt;
Link: https://lore.kernel.org/r/20230919033055.14085-1-xingxing.luo@unisoc.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Revert "usb: common: usb-conn-gpio: Set last role to unknown before initial detection"</title>
<updated>2023-07-27T06:44:06+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2023-06-15T09:30:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8e00ae25a37159e8fa619ade9204c58cdfa7370e'/>
<id>urn:sha1:8e00ae25a37159e8fa619ade9204c58cdfa7370e</id>
<content type='text'>
[ Upstream commit df49f2a0ac4a34c0cb4b5c233fcfa0add644c43c ]

This reverts commit edd60d24bd858cef165274e4cd6cab43bdc58d15.

Heikki reports that this should not be a global flag just to work around
one broken driver and should be fixed differently, so revert it.

Reported-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Fixes: edd60d24bd85 ("usb: common: usb-conn-gpio: Set last role to unknown before initial detection")
Link: https://lore.kernel.org/r/ZImE4L3YgABnCIsP@kuha.fi.intel.com
Cc: Prashanth K &lt;quic_prashk@quicinc.com&gt;
Cc: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.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: common: usb-conn-gpio: Set last role to unknown before initial detection</title>
<updated>2023-07-27T06:44:06+00:00</updated>
<author>
<name>Prashanth K</name>
<email>quic_prashk@quicinc.com</email>
</author>
<published>2023-05-31T14:41:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7ade555ac58d12d1de6c5b4c5a79d631b1d06233'/>
<id>urn:sha1:7ade555ac58d12d1de6c5b4c5a79d631b1d06233</id>
<content type='text'>
[ Upstream commit edd60d24bd858cef165274e4cd6cab43bdc58d15 ]

Currently if we bootup a device without cable connected, then
usb-conn-gpio won't call set_role() since last_role is same as
current role. This happens because during probe last_role gets
initialised to zero.

To avoid this, added a new constant in enum usb_role, last_role
is set to USB_ROLE_UNKNOWN before performing initial detection.

While at it, also handle default case for the usb_role switch
in cdns3, intel-xhci-usb-role-switch &amp; musb/jz4740 to avoid
build warnings.

Fixes: 4602f3bff266 ("usb: common: add USB GPIO based connection detection driver")
Signed-off-by: Prashanth K &lt;quic_prashk@quicinc.com&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Message-ID: &lt;1685544074-17337-1-git-send-email-quic_prashk@quicinc.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: musb: remove extra check in musb_gadget_vbus_draw</title>
<updated>2023-01-14T09:15:09+00:00</updated>
<author>
<name>Ivaylo Dimitrov</name>
<email>ivo.g.dimitrov.75@gmail.com</email>
</author>
<published>2022-11-25T18:21:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=60184b1437db4152096cebde5f364411cfaf8501'/>
<id>urn:sha1:60184b1437db4152096cebde5f364411cfaf8501</id>
<content type='text'>
[ Upstream commit ecec4b20d29c3d6922dafe7d2555254a454272d2 ]

The checks for musb-&gt;xceiv and musb-&gt;xceiv-&gt;set_power duplicate those in
usb_phy_set_power(), so there is no need of them. Moreover, not calling
usb_phy_set_power() results in usb_phy_set_charger_current() not being
called, so current USB config max current is not propagated through USB
charger framework and charger drivers may try to draw more current than
allowed or possible.

Fix that by removing those extra checks and calling usb_phy_set_power()
directly.

Tested on Motorola Droid4 and Nokia N900

Fixes: a9081a008f84 ("usb: phy: Add USB charger support")
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: Ivaylo Dimitrov &lt;ivo.g.dimitrov.75@gmail.com&gt;
Link: https://lore.kernel.org/r/1669400475-4762-1-git-send-email-ivo.g.dimitrov.75@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
</feed>
