[PATCH v7 5/5] usb: dwc3: qcom: Modify interrupt handling for eUSB2 Phy targets

sashiko-bot at kernel.org sashiko-bot at kernel.org
Sat Sep 5 08:40:25 PDT 2026


Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The driver will fail to probe if CONFIG_GENERIC_PHY is disabled because devm_of_phy_get_by_index() returns -ENOSYS.
--

commit 7538db3f4327a94f92b49936063fdf191b900637
Author: Krishna Kurapati <krishna.kurapati at oss.qualcomm.com>

usb: dwc3: qcom: Modify interrupt handling for eUSB2 Phy targets

This commit updates the dwc3-qcom driver to dynamically query the attached
PHY type and adjust the eD+/eD- line wakeup interrupts accordingly for
eUSB2 targets in host mode.

> diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c
> index ba26e61df915a..2d1e66ff72ed5 100644
> --- a/drivers/usb/dwc3/dwc3-qcom.c
> +++ b/drivers/usb/dwc3/dwc3-qcom.c

[ ... ]

> @@ -698,6 +720,17 @@ static int dwc3_qcom_probe(struct platform_device *pdev)
>  	if (ret)
>  		goto clk_disable;
>  
> +	phy = devm_of_phy_get_by_index(dev, dev->of_node, 0);
> +	if (IS_ERR(phy)) {
> +		if (PTR_ERR(phy) != -ENODEV) {

[Severity: High]
Will this cause a regression in dwc3_qcom_probe() when CONFIG_GENERIC_PHY is
disabled?

When CONFIG_GENERIC_PHY is not set, devm_of_phy_get_by_index() returns
ERR_PTR(-ENOSYS). Since -ENOSYS does not equal -ENODEV, this check will
evaluate to true and cause the probe to unconditionally abort.

Prior to this patch, the driver did not fetch the PHY directly, and the
DWC3 core gracefully handles -ENOSYS by treating it identically to -ENODEV.
Could this error handling be updated to also ignore -ENOSYS so that existing
configurations without CONFIG_GENERIC_PHY continue to work?

> +			ret = dev_err_probe(dev, PTR_ERR(phy),
> +					    "failed to get usb2 phy\n");
> +			goto clk_disable;
> +		}
> +		phy = NULL;
> +	}
> +	qcom->has_eusb2_phy = (phy_get_type(phy) == PHY_TYPE_EUSB2);
> +
>  	qcom->mode = usb_get_dr_mode(dev);

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260905-eusb2-interrupt-v7-v7-0-820cf5377a70@oss.qualcomm.com?part=5



More information about the linux-phy mailing list