Loading drivers/pci/pcie/aspm.c +14 −7 Original line number Diff line number Diff line Loading @@ -1166,7 +1166,17 @@ static int __pci_enable_link_state(struct pci_dev *pdev, int state, bool locked) return 0; } static int __pci_enable_link_state(struct pci_dev *pdev, int state, bool locked) /** * pci_enable_link_state - Clear and set the default device link state so that * the link may be allowed to enter the specified states. Note that if the * BIOS didn't grant ASPM control to the OS, this does nothing because we can't * touch the LNKCTL register. Also note that this does not enable states * disabled by pci_disable_link_state(). Return 0 or a negative errno. * * @pdev: PCI device * @state: Mask of ASPM link states to enable */ int pci_enable_link_state(struct pci_dev *pdev, int state) { return __pci_enable_link_state(pdev, state, false); } Loading Loading @@ -1206,7 +1216,6 @@ static int pcie_aspm_set_policy(const char *val, if (i == aspm_policy) return 0; if (!locked) down_read(&pci_bus_sem); mutex_lock(&aspm_lock); aspm_policy = i; Loading Loading @@ -1275,7 +1284,6 @@ static ssize_t aspm_attr_store_common(struct device *dev, if (kstrtobool(buf, &state_enable) < 0) return -EINVAL; if (!locked) down_read(&pci_bus_sem); mutex_lock(&aspm_lock); Loading Loading @@ -1335,7 +1343,6 @@ static ssize_t clkpm_store(struct device *dev, if (kstrtobool(buf, &state_enable) < 0) return -EINVAL; if (!locked) down_read(&pci_bus_sem); mutex_lock(&aspm_lock); Loading Loading
drivers/pci/pcie/aspm.c +14 −7 Original line number Diff line number Diff line Loading @@ -1166,7 +1166,17 @@ static int __pci_enable_link_state(struct pci_dev *pdev, int state, bool locked) return 0; } static int __pci_enable_link_state(struct pci_dev *pdev, int state, bool locked) /** * pci_enable_link_state - Clear and set the default device link state so that * the link may be allowed to enter the specified states. Note that if the * BIOS didn't grant ASPM control to the OS, this does nothing because we can't * touch the LNKCTL register. Also note that this does not enable states * disabled by pci_disable_link_state(). Return 0 or a negative errno. * * @pdev: PCI device * @state: Mask of ASPM link states to enable */ int pci_enable_link_state(struct pci_dev *pdev, int state) { return __pci_enable_link_state(pdev, state, false); } Loading Loading @@ -1206,7 +1216,6 @@ static int pcie_aspm_set_policy(const char *val, if (i == aspm_policy) return 0; if (!locked) down_read(&pci_bus_sem); mutex_lock(&aspm_lock); aspm_policy = i; Loading Loading @@ -1275,7 +1284,6 @@ static ssize_t aspm_attr_store_common(struct device *dev, if (kstrtobool(buf, &state_enable) < 0) return -EINVAL; if (!locked) down_read(&pci_bus_sem); mutex_lock(&aspm_lock); Loading Loading @@ -1335,7 +1343,6 @@ static ssize_t clkpm_store(struct device *dev, if (kstrtobool(buf, &state_enable) < 0) return -EINVAL; if (!locked) down_read(&pci_bus_sem); mutex_lock(&aspm_lock); Loading