On Tue, May 17, 2022 at 03:50:46PM +0300, Serge Semin wrote: > It's logically correct to undo everything what was done in case of an > error is discovered or in the corresponding cleanup counterpart. Otherwise > the host controller will be left in an undetermined state. Seeing the link > is set up in the Host-initialization method it will be right to > de-activate it there in the cleanup-on-error block and stop the link in > the antagonistic routine - dw_pcie_host_deinit(). The link de-activation > is a platform-specific thing and is supposed to be implemented in the > framework of the dw_pcie_ops.stop_link() operation. > > Fixes: 886a9c134755 ("PCI: dwc: Move link handling into common code") > Signed-off-by: Serge Semin <Sergey.Semin@xxxxxxxxxxxxxxxxxxxx> > Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx> > Tested-by: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx> > --- > .../pci/controller/dwc/pcie-designware-host.c | 16 ++++++++++++++-- > 1 file changed, 14 insertions(+), 2 deletions(-) Reviewed-by: Rob Herring <robh@xxxxxxxxxx>