mirror of
https://github.com/torvalds/linux.git
synced 2024-11-18 01:51:53 +00:00
PCI/ASPM: Don't warn if already in common clock mode
Previously we emitted a warning if we tried to configure common clock mode the link was already configured to common clock mode by the UEFI BIOS. Bail out silently in that case instead of emitting the warning: pci 0004:00:00.0: ASPM: Could not configure common clock Signed-off-by: Sinan Kaya <okaya@codeaurora.org> [bhelgaas: changelog] Signed-off-by: Bjorn Helgaas <helgaas@kernel.org>
This commit is contained in:
parent
f51af8a63c
commit
04875177db
@ -228,6 +228,24 @@ static void pcie_aspm_configure_common_clock(struct pcie_link_state *link)
|
||||
if (!(reg16 & PCI_EXP_LNKSTA_SLC))
|
||||
same_clock = 0;
|
||||
|
||||
/* Port might be already in common clock mode */
|
||||
pcie_capability_read_word(parent, PCI_EXP_LNKCTL, ®16);
|
||||
if (same_clock && (reg16 & PCI_EXP_LNKCTL_CCC)) {
|
||||
bool consistent = true;
|
||||
|
||||
list_for_each_entry(child, &linkbus->devices, bus_list) {
|
||||
pcie_capability_read_word(child, PCI_EXP_LNKCTL,
|
||||
®16);
|
||||
if (!(reg16 & PCI_EXP_LNKCTL_CCC)) {
|
||||
consistent = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (consistent)
|
||||
return;
|
||||
pci_warn(parent, "ASPM: current common clock configuration is broken, reconfiguring\n");
|
||||
}
|
||||
|
||||
/* Configure downstream component, all functions */
|
||||
list_for_each_entry(child, &linkbus->devices, bus_list) {
|
||||
pcie_capability_read_word(child, PCI_EXP_LNKCTL, ®16);
|
||||
|
Loading…
Reference in New Issue
Block a user