PCI/ASPM: Suppress common clock mode setting failure
Subsystems (2)
PATCH 1/1 PCI/ASPM: Suppress common clock mode setting failure
Code is emitting warnings when it tries to set the common clock mode for ASPM and ASPM is already configured to common clock mode by the UEFI BIOS. Let's bail out silently in such a case.
pci 0004:00:00.0: ASPM: Could not configure common clock
Signed-off-by Sinan Kaya <[email protected]>
--- drivers/pci/pcie/aspm.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/pci/pcie/aspm.c +5 -0
@@ -253,6 +253,11 @@ static void pcie_aspm_configure_common_clock(struct pcie_link_state *link)/* Configure upstream component */ pcie_capability_read_word (parent,PCI_EXP_LNKCTL , ®16); + +/* Port might be already in common clock mode */ +if ((same_clock) && (reg16 &PCI_EXP_LNKCTL_CCC )) +return ; + parent_reg = reg16;if (same_clock) reg16 |=PCI_EXP_LNKCTL_CCC ;
Signature · 1 line
1.9.1
drivers/pci/pcie/aspm.c static void pcie_aspm_configure_common_clock(struct pcie_link_state *link) · line 260
Quoted 10 lines · Sinan Kaya
+++
b/drivers/pci/pcie/aspm.cdrivers/pci/pcie/aspm.c +5
-0@@ -253,6 +253,11 @@ static void pcie_aspm_configure_common_clock(struct pcie_link_state *link)/* Configure upstream component */ pcie_capability_read_word (parent,PCI_EXP_LNKCTL , ®16); + +/* Port might be already in common clock mode */ +if ((same_clock) && (reg16 &PCI_EXP_LNKCTL_CCC )) +return ; +
I think the placement of this statement is too late. I'll move it a couple of lines and post V2.
Signature · 3 lines
Sinan Kaya Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.