From: sashiko-bot@kernel.org
To: "Krishna Kurapati" <krishna.kurapati@oss.qualcomm.com>
Cc: linux-phy@lists.infradead.org, conor+dt@kernel.org,
robh@kernel.org, devicetree@vger.kernel.org, vkoul@kernel.org,
neil.armstrong@linaro.org, olteanv@gmail.com
Subject: Re: [PATCH v5 5/5] usb: dwc3: qcom: Modify interrupt handling for eUSB2 Phy targets
Date: Thu, 23 Jul 2026 11:31:39 +0000 [thread overview]
Message-ID: <20260723113140.1152C1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260723-eusb2-int-handling-v5-v5-5-f32ea6c1a318@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] Resource leak on devm_phy_get() error path in dwc3_qcom_probe().
- [High] Probe fails due to unhandled -ENOSYS when CONFIG_GENERIC_PHY is disabled.
- [Low] Comment describing DP/DM interrupt polarity contradicts new eUSB2 logic.
--
--- Patch [5]: [PATCH v5 5/5] usb: dwc3: qcom: Modify interrupt handling for eUSB2 Phy targets ---
commit e7aac8b655de03b8e81bfa727922960500cb9ae3
Author: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>
usb: dwc3: qcom: Modify interrupt handling for eUSB2 Phy targets
This commit modifies the interrupt handling logic in the DWC3 Qualcomm
driver to support eUSB2 PHY targets. It queries the PHY type during
probe and configures remote wakeup interrupt polarities based on the
eUSB2 specification for different device speeds.
> diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c
> index f43f73ac36ff1..4c559b97c6276 100644
> --- a/drivers/usb/dwc3/dwc3-qcom.c
> +++ b/drivers/usb/dwc3/dwc3-qcom.c
[ ... ]
> @@ -289,8 +298,10 @@ static void dwc3_qcom_disable_port_interrupts(struct dwc3_qcom_port *port)
> dwc3_qcom_disable_wakeup_irq(port->ss_phy_irq);
> }
>
> -static void dwc3_qcom_enable_port_interrupts(struct dwc3_qcom_port *port)
> +static void dwc3_qcom_enable_port_interrupts(struct dwc3_qcom *qcom, int port_index)
> {
> + struct dwc3_qcom_port *port = &qcom->ports[port_index];
> +
> dwc3_qcom_enable_wakeup_irq(port->qusb2_phy_irq, 0);
>
> /*
> @@ -303,12 +314,20 @@ static void dwc3_qcom_enable_port_interrupts(struct dwc3_qcom_port *port)
> */
[Severity: Low]
This isn't a bug, but does this comment block need to be updated? The newly
added eUSB2 logic below configures these lines as rising edge, which
contradicts the behavior described in this comment.
>
> if (port->usb2_speed == USB_SPEED_LOW) {
> - dwc3_qcom_enable_wakeup_irq(port->dm_hs_phy_irq,
> - IRQ_TYPE_EDGE_FALLING);
> + if (qcom->has_eusb2_phy)
> + dwc3_qcom_enable_wakeup_irq(port->dp_hs_phy_irq,
> + IRQ_TYPE_EDGE_RISING);
[ ... ]
> @@ -683,6 +703,19 @@ static int dwc3_qcom_probe(struct platform_device *pdev)
> if (ignore_pipe_clk)
> dwc3_qcom_select_utmi_clk(qcom);
>
> + if (qcom->num_ports == 1)
> + phy = devm_phy_get(dev, "usb2-phy");
> + else
> + phy = devm_phy_get(dev, "usb2-0");
> +
> + if (IS_ERR(phy)) {
> + if (PTR_ERR(phy) != -ENODEV)
[Severity: High]
If the kernel is compiled without CONFIG_GENERIC_PHY, devm_phy_get() will
return -ENOSYS. Since this check only ignores -ENODEV, will this cause the
probe to fail entirely for configurations without generic PHY support?
> + return dev_err_probe(dev, PTR_ERR(phy),
> + "failed to get usb2 phy\n");
[Severity: High]
Does this return directly without jumping to the clk_disable error label?
Earlier in dwc3_qcom_probe(), clk_bulk_prepare_enable() is called. If
devm_phy_get() fails with an error like -EPROBE_DEFER, will this leak the
clock prepare and enable counts?
> + phy = NULL;
> + }
> + qcom->has_eusb2_phy = phy && (phy_get_type(phy) == PHY_TYPE_EUSB2);
> +
> qcom->mode = usb_get_dr_mode(dev);
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260723-eusb2-int-handling-v5-v5-0-f32ea6c1a318@oss.qualcomm.com?part=5
prev parent reply other threads:[~2026-07-23 11:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-23 10:39 [PATCH v5 0/5] Modify interrupt handling for eUSB2 Phy targets Krishna Kurapati
2026-07-23 10:39 ` [PATCH v5 1/5] dt-bindings: phy: Add PHY_TYPE_EUSB2 definition Krishna Kurapati
2026-07-23 10:39 ` [PATCH v5 2/5] include: linux: phy: Add phy attribute "type" and associated helpers Krishna Kurapati
2026-07-23 10:39 ` [PATCH v5 3/5] phy: snps-eusb2: Set phy type to EUSB2 Krishna Kurapati
2026-07-23 10:39 ` [PATCH v5 4/5] phy: qcom: m31-eusb2: " Krishna Kurapati
2026-07-23 10:39 ` [PATCH v5 5/5] usb: dwc3: qcom: Modify interrupt handling for eUSB2 Phy targets Krishna Kurapati
2026-07-23 11:31 ` sashiko-bot [this message]
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=20260723113140.1152C1F000E9@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