Skip to content

Commit 90c6cb4

Browse files
paliLorenzo Pieralisi
authored andcommitted
PCI: aardvark: Don't blindly enable ASPM L0s and don't write to read-only register
Trying to change Link Status register does not have any effect as this is a read-only register. Trying to overwrite bits for Negotiated Link Width does not make sense. In future proper change of link width can be done via Lane Count Select bits in PCIe Control 0 register. Trying to unconditionally enable ASPM L0s via ASPM Control bits in Link Control register is wrong. There should be at least some detection if endpoint supports L0s as isn't mandatory. Moreover ASPM Control bits in Link Control register are controlled by pcie/aspm.c code which sets it according to system ASPM settings, immediately after aardvark driver probes. So setting these bits by aardvark driver has no long running effect. Remove code which touches ASPM L0s bits from this driver and let kernel's ASPM implementation to set ASPM state properly. Some users are reporting issues that this code is problematic for some Intel wifi cards and removing it fixes them, see e.g.: https://bugzilla.kernel.org/show_bug.cgi?id=196339 If problems with Intel wifi cards occur even after this commit, then pcie/aspm.c code could be modified / hooked to not enable ASPM L0s state for affected problematic cards. Link: https://lore.kernel.org/r/[email protected] Tested-by: Tomasz Maciej Nowak <[email protected]> Signed-off-by: Pali Rohár <[email protected]> Signed-off-by: Lorenzo Pieralisi <[email protected]> Acked-by: Rob Herring <[email protected]> Acked-by: Thomas Petazzoni <[email protected]>
1 parent 6964494 commit 90c6cb4

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

drivers/pci/controller/pci-aardvark.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -356,10 +356,6 @@ static void advk_pcie_setup_hw(struct advk_pcie *pcie)
356356

357357
advk_pcie_wait_for_link(pcie);
358358

359-
reg = PCIE_CORE_LINK_L0S_ENTRY |
360-
(1 << PCIE_CORE_LINK_WIDTH_SHIFT);
361-
advk_writel(pcie, reg, PCIE_CORE_LINK_CTRL_STAT_REG);
362-
363359
reg = advk_readl(pcie, PCIE_CORE_CMD_STATUS_REG);
364360
reg |= PCIE_CORE_CMD_MEM_ACCESS_EN |
365361
PCIE_CORE_CMD_IO_ACCESS_EN |

0 commit comments

Comments
 (0)