devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Krishna Kurapati" <krishna.kurapati@oss.qualcomm.com>
Cc: robh@kernel.org, olteanv@gmail.com, devicetree@vger.kernel.org,
	vkoul@kernel.org, conor+dt@kernel.org, neil.armstrong@linaro.org,
	linux-phy@lists.infradead.org
Subject: Re: [PATCH v7 5/5] usb: dwc3: qcom: Modify interrupt handling for eUSB2 Phy targets
Date: Sat, 05 Sep 2026 15:40:25 +0000	[thread overview]
Message-ID: <20260905154025.ED6D91F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260905-eusb2-interrupt-v7-v7-5-820cf5377a70@oss.qualcomm.com>

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@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

  reply	other threads:[~2026-09-05 15:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-05 15:29 [PATCH v7 0/5] Modify interrupt handling for eUSB2 Phy targets Krishna Kurapati
2026-09-05 15:29 ` [PATCH v7 1/5] dt-bindings: phy: Add PHY_TYPE_EUSB2 definition Krishna Kurapati
2026-09-10 15:53   ` Manivannan Sadhasivam
2026-09-05 15:29 ` [PATCH v7 2/5] include: linux: phy: Add phy attribute "type" and associated helpers Krishna Kurapati
2026-09-10 15:54   ` Manivannan Sadhasivam
2026-09-05 15:29 ` [PATCH v7 3/5] phy: snps-eusb2: Set phy type to EUSB2 Krishna Kurapati
2026-09-10 15:55   ` Manivannan Sadhasivam
2026-09-05 15:29 ` [PATCH v7 4/5] phy: qcom: m31-eusb2: " Krishna Kurapati
2026-09-10 15:56   ` Manivannan Sadhasivam
2026-09-05 15:29 ` [PATCH v7 5/5] usb: dwc3: qcom: Modify interrupt handling for eUSB2 Phy targets Krishna Kurapati
2026-09-05 15:40   ` sashiko-bot [this message]
2026-09-09 13:00   ` Konrad Dybcio

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260905154025.ED6D91F00A3A@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krishna.kurapati@oss.qualcomm.com \
    --cc=linux-phy@lists.infradead.org \
    --cc=neil.armstrong@linaro.org \
    --cc=olteanv@gmail.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).