[PATCH AUTOSEL 6.19-5.10] phy: fsl-imx8mq-usb: disable bind/unbind platform driver feature

From: Sasha Levin

Date: Wed Feb 18 2026 - 21:15:02 EST


From: Xu Yang <xu.yang_2@xxxxxxx>

[ Upstream commit 27ee0869d77b2cb404770ac49bdceae3aedf658b ]

Disabling PHYs in runtime usually causes the client with external abort
exception or similar issue due to lack of API to notify clients about PHY
removal. This patch removes the possibility to unbind i.MX PHY drivers in
runtime.

Signed-off-by: Xu Yang <xu.yang_2@xxxxxxx>
Reviewed-by: Frank Li <Frank.Li@xxxxxxx>
Link: https://patch.msgid.link/20260120111712.3159782-1-xu.yang_2@xxxxxxx
Signed-off-by: Vinod Koul <vkoul@xxxxxxxxxx>
Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
---

LLM Generated explanations, may be completely bogus:

## Analysis Summary

### What the commit does
This commit adds `.suppress_bind_attrs = true` to the i.MX8MQ USB PHY
platform driver. This single line prevents the kernel from creating
`/sys/bus/platform/drivers/imx8mq-usb-phy/bind` and
`/sys/bus/platform/drivers/imx8mq-usb-phy/unbind` sysfs files, thereby
preventing runtime unbinding of the PHY driver.

### Problem being fixed
The commit message states that unbinding PHYs at runtime causes
"external abort exception or similar issue" because there is no API to
notify PHY clients about PHY removal. An external abort is a serious ARM
exception that typically results in a kernel crash/oops. If a user or
management tool writes to the `unbind` sysfs file for this PHY driver,
the USB controller client would try to access the now-missing PHY
resources, resulting in a crash.

### Stable kernel rules assessment
1. **Obviously correct and tested**: Yes - this is a well-established
one-line pattern used in 385+ files in the kernel. It's reviewed by
the PHY maintainer (Vinod Koul) and reviewed by Frank Li.
2. **Fixes a real bug**: Yes - runtime unbinding causes a crash
(external abort exception). This is a real, triggerable issue.
3. **Important issue**: Moderate - it prevents a crash, but only
triggered by explicit sysfs manipulation (not normal operation).
However, system management tools or user error could trigger this.
4. **Small and contained**: Yes - single one-line addition to a driver
struct.
5. **No new features**: Correct - this removes functionality (ability to
unbind), it doesn't add any.

### Risk assessment
- **Risk**: Extremely low. This is literally a single boolean field
being set in the driver struct. It only affects sysfs attributes. The
same pattern exists in 385+ other drivers.
- **Benefit**: Prevents a crash scenario when the PHY is unbound at
runtime.
- **Dependencies**: None - this is entirely self-contained.

### Concerns
- The bug is only triggerable by explicit sysfs manipulation (writing to
`/sys/bus/platform/drivers/imx8mq-usb-phy/unbind`), not by normal
system operation.
- The fix is a defensive measure rather than fixing a root cause in the
PHY framework. However, this is the standard kernel approach - the PHY
framework doesn't have removal notification, so drivers that can't
handle unbinding should suppress it.
- The change is straightforward and would apply cleanly to any stable
tree that has this driver.

### Classification
This falls into the **hardware quirk/workaround** category. It's a
defensive fix that prevents a crash scenario. While the trigger requires
explicit user action (sysfs unbind), this is a well-established pattern
in the kernel for exactly this purpose.

## Verification
- Verified `suppress_bind_attrs = true` is used in 385+ files across the
drivers/ directory via Grep search
- Verified 7 other PHY drivers (Samsung, HiSilicon) already use this
pattern
- Verified no other Freescale PHY drivers currently have this attribute
(this is the first)
- Verified via git log that similar commits exist for other subsystems
(gpio, perf)
- Verified via lore.kernel.org that the patch was reviewed by Frank Li
and accepted by PHY maintainer Vinod Koul
- Verified the commit message describes a real crash scenario (external
abort exception)
- Could NOT verify the specific crash reproduction steps (unverified,
but the mechanism is well-understood in the kernel community)

The fix is minimal (one line), extremely low risk, prevents a crash
scenario, uses a well-established kernel pattern, and was properly
reviewed. It meets all stable kernel criteria.

**YES**

drivers/phy/freescale/phy-fsl-imx8mq-usb.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/phy/freescale/phy-fsl-imx8mq-usb.c b/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
index 91b3e62743d3a..b30d01f345d20 100644
--- a/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
+++ b/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
@@ -730,6 +730,7 @@ static struct platform_driver imx8mq_usb_phy_driver = {
.driver = {
.name = "imx8mq-usb-phy",
.of_match_table = imx8mq_usb_phy_of_match,
+ .suppress_bind_attrs = true,
}
};
module_platform_driver(imx8mq_usb_phy_driver);
--
2.51.0