]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
PCI: tegra194: Fix link up retry sequence
authorVidya Sagar <vidyas@nvidia.com>
Thu, 21 Jul 2022 14:20:50 +0000 (19:50 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 21 Aug 2022 13:16:02 +0000 (15:16 +0200)
[ Upstream commit e05fd6ae77c3e2cc0dba283005d24b6d56d2b1fa ]

Add the missing DLF capability offset while clearing DL_FEATURE_EXCHANGE_EN
bit during link up retry.

Link: https://lore.kernel.org/r/20220721142052.25971-15-vidyas@nvidia.com
Fixes: 56e15a238d92 ("PCI: tegra: Add Tegra194 PCIe support")
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pci/controller/dwc/pcie-tegra194.c

index bcbd600116d7e91c54fc5afcf9f3da73acb93ee7..1222f5749bc67ae7fe0b63a42326681bcd008455 100644 (file)
@@ -963,7 +963,7 @@ static int tegra_pcie_dw_host_init(struct pcie_port *pp)
                offset = dw_pcie_find_ext_capability(pci, PCI_EXT_CAP_ID_DLF);
                val = dw_pcie_readl_dbi(pci, offset + PCI_DLF_CAP);
                val &= ~PCI_DLF_EXCHANGE_ENABLE;
-               dw_pcie_writel_dbi(pci, offset, val);
+               dw_pcie_writel_dbi(pci, offset + PCI_DLF_CAP, val);
 
                tegra_pcie_prepare_host(pp);