Re: [PATCH] PCI: dwc: Provide deinit callback for i.MX

From: Fabio Estevam
Date: Tue Jul 04 2023 - 08:14:12 EST


On Tue, Jul 4, 2023 at 8:55 AM Mark Brown <broonie@xxxxxxxxxx> wrote:

> Well, they're both issues - if someone unloads or unbinds the driver we
> can still trigger this, even if the probe succeeded.

Yes, for your change:

Tested-by: Fabio Estevam <festevam@xxxxxxxxx>

> > It should not fail to probe. At least, this was the original intention
> > with Rob's commit:
>
> > 886a9c134755 ("PCI: dwc: Move link handling into common code")
>
> > + return 0;
> >
> > err_remove_edma:
> > dw_pcie_edma_remove(pci);
>
> I have no idea about doing this, all the PCI on the board that I care
> about seems to work fine (and worked fine even with the failure, I'm not
> sure this is being generated by a link that's in use).

The probe failure when link is not up happens in linux-next due to commit:

da56a1bfbab5 ("PCI: dwc: Wait for link up only if link is started")

Prior this commit the PCI driver probed successfully even when the
link was down.