Re: ChipIdea USB regression

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

 



+Arnd, Tony

On Fri, Jan 14, 2022 at 5:18 AM Charles Keepax
<ckeepax@xxxxxxxxxxxxxxxxxxxxx> wrote:
>
> On Fri, Jan 14, 2022 at 10:56:20AM +0000, Charles Keepax wrote:
> > Hi guys,
> >
> > My Zynq based board stopped booting today, a bisect points to this
> > patch:
> >
> > commit 0f153a1b8193 ("usb: chipidea: Set the DT node on the child device")
> >
> > It looks like it gets stuck in some sort of boot loop of doom:
>
> Ok so poking that a little more, I think I can see what happens,
> the USB DT node looks like this:
>
> usb0: usb@e0002000 {
>         compatible = "xlnx,zynq-usb-2.20a", "chipidea,usb2";
>         status = "disabled";
>         clocks = <&clkc 28>;
>         interrupt-parent = <&intc>;
>         interrupts = <0 21 4>;
>         reg = <0xe0002000 0x1000>;
>         phy_type = "ulpi";
> };
>
> &usb0 {
>         status = "okay";
>
>         dr_mode = "host";
>         usb-phy = <&usb_phy0>;
> };
>
> So when that patch copies the DT node to the new platform device
> in ci_hdrc_add_device it copies the compatible stuff as well as
> the IRQ stuff it was targeting, this presumably causes the kernel
> to bind a new copy of the driver to that new device, which probes
> and calls ci_hdrc_add_device again repeating the process until
> it dies.
>
> Kinda looks to me like the best solution might just be to revert
> the patch, I am not sure I see how that copy of the DT is supposed
> to work?

It's not copying the DT, but yes AFAICT it does match and bind the
child device on the parent driver using the compatible match instead
of matching on driver name. I think we can use the of_reuse_node flag
to avoid this in the match, but that needs some more investigation.

Rob



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux