[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZgHUR-Rk-YzqiTtt@hovoldconsulting.com>
Date: Mon, 25 Mar 2024 20:45:11 +0100
From: Johan Hovold <johan@...nel.org>
To: Krishna Kurapati PSSNV <quic_kriskura@...cinc.com>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Rob Herring <robh+dt@...nel.org>,
Bjorn Andersson <andersson@...nel.org>,
Wesley Cheng <quic_wcheng@...cinc.com>,
Konrad Dybcio <konrad.dybcio@...aro.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Conor Dooley <conor+dt@...nel.org>,
Thinh Nguyen <Thinh.Nguyen@...opsys.com>,
Felipe Balbi <balbi@...nel.org>, devicetree@...r.kernel.org,
linux-arm-msm@...r.kernel.org, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org, quic_ppratap@...cinc.com,
quic_jackp@...cinc.com
Subject: Re: [PATCH v16 7/9] usb: dwc3: qcom: Refactor IRQ handling in glue
driver
On Mon, Mar 25, 2024 at 10:59:49PM +0530, Krishna Kurapati PSSNV wrote:
> On 3/25/2024 6:53 PM, Johan Hovold wrote:
> > ret = dwc3_qcom_find_num_ports(pdev);
> > if (ret < 0)
> > return ret;
> >
> > qcom->num_ports = ret;
> >
> > It looks like dwc3_qcom_find_num_ports() can also return 0 (e.g. on
> > malformed DT), which also needs to be handled somehow. I missed that
> > earlier.
>
> From what I remember, Konrad mentioned that we might not need to
> support incomplete or improper DT [1].
You still need to make sure that the driver doesn't misbehave on
malformed input.
> Also since this is close to getting merged, can we take up any changes
> for Malformed DT handling later given that only one or two devices are
> present and less likely to be given a malformed DT.
No, and I'm a bit disappointed that you're still trying to take short
cuts to getting these patches merged after I've told you repeatedly that
that is not how upstream works.
Fortunately, this is easily fixed and would both simplify the code
further and reduce the risk of breaking backwards compatibility.
Just change the logic in dwc3_qcom_find_num_ports() so that it returns 1
if "dp_hs_phy_1" is missing, and otherwise you determine the number of
ports by iterating from 2 to DWC3_MAX_PORTS - 1.
Johan
Powered by blists - more mailing lists