Skip to content

Commit

Permalink
PCI/ASPM: Use correct capability pointer to program LTR_L1.2_THRESHOLD
Browse files Browse the repository at this point in the history
Previously we programmed the LTR_L1.2_THRESHOLD in the parent (upstream)
device using the capability pointer of the *child* (downstream) device,
which corrupted some random word of the parent's config space.

Use the parent's L1 SS capability pointer to program its
LTR_L1.2_THRESHOLD.

Fixes: aeda9ad ("PCI/ASPM: Configure L1 substate settings")
Signed-off-by: Bjorn Helgaas <[email protected]>
Reviewed-by: Vidya Sagar <[email protected]>
CC: [email protected]	# v4.11+
CC: Rajat Jain <[email protected]>
  • Loading branch information
bjorn-helgaas committed Nov 14, 2017
1 parent 94ac327 commit c00054f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pci/pcie/aspm.c
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ static void pcie_config_aspm_l1ss(struct pcie_link_state *link, u32 state)
0xFF00, link->l1ss.ctl1);

/* Program LTR L1.2 threshold in both ports */
pci_clear_and_set_dword(parent, dw_cap_ptr + PCI_L1SS_CTL1,
pci_clear_and_set_dword(parent, up_cap_ptr + PCI_L1SS_CTL1,
0xE3FF0000, link->l1ss.ctl1);
pci_clear_and_set_dword(child, dw_cap_ptr + PCI_L1SS_CTL1,
0xE3FF0000, link->l1ss.ctl1);
Expand Down

0 comments on commit c00054f

Please sign in to comment.