diff options
| author | Serge Semin <[email protected]> | 2022-06-24 14:34:11 +0000 |
|---|---|---|
| committer | Bjorn Helgaas <[email protected]> | 2022-07-06 00:00:32 +0000 |
| commit | 113fa857b74c947137d845e7e635afcf6a59c43a (patch) | |
| tree | aeef2f13eafa99be5076575d13d889d692f434d2 /drivers/pci/controller/dwc/pci-keystone.c | |
| parent | Linux 5.19-rc1 (diff) | |
| download | kernel-113fa857b74c947137d845e7e635afcf6a59c43a.tar.gz kernel-113fa857b74c947137d845e7e635afcf6a59c43a.zip | |
PCI: dwc: Stop link on host_init errors and de-initialization
It's logically correct to undo everything that was done when an error is
discovered or in the corresponding cleanup counterpart. Otherwise the host
controller will be left in an undetermined state. Since the link is set up
in the host_init method, deactivate it there in the cleanup-on-error block
and stop the link in the antagonistic routine - dw_pcie_host_deinit(). Link
deactivation is platform-specific and should be implemented in
dw_pcie_ops.stop_link().
Fixes: 886a9c134755 ("PCI: dwc: Move link handling into common code")
Link: https://lore.kernel.org/r/[email protected]
Tested-by: Manivannan Sadhasivam <[email protected]>
Signed-off-by: Serge Semin <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
Reviewed-by: Manivannan Sadhasivam <[email protected]>
Reviewed-by: Rob Herring <[email protected]>
Diffstat (limited to 'drivers/pci/controller/dwc/pci-keystone.c')
0 files changed, 0 insertions, 0 deletions
