Re: [PATCH v16 7/9] usb: dwc3: qcom: Refactor IRQ handling in glue driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


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.


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux