PCI ASPM: do not clear enabled field by support field

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Wednesday, September 16, 2009 - 7:59 am

Gitweb:     http://git.kernel.org/linus/b127bd55d9cd9d5b40278b30645669d6d46933bc
Commit:     b127bd55d9cd9d5b40278b30645669d6d46933bc
Parent:     6f1186be4feb3364d3a52cbea81e43e4d5296196
Author:     Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
AuthorDate: Wed Aug 19 10:57:31 2009 +0900
Committer:  Jesse Barnes <jbarnes@virtuousgeek.org>
CommitDate: Wed Sep 9 13:29:44 2009 -0700

    PCI ASPM: do not clear enabled field by support field
    
    We must not clear bits in 'aspm_enabled' using 'aspm_support', or
    'aspm_enabled' and 'aspm_default' might be different from the actual
    state. In addtion, 'aspm_default' should be intialized even if
    'aspm_support' is 0.
    
    Acked-by: Shaohua Li <shaohua.li@intel.com>
    Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
    Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
---
 drivers/pci/pcie/aspm.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
index 3d27c97..9759714 100644
--- a/drivers/pci/pcie/aspm.c
+++ b/drivers/pci/pcie/aspm.c
@@ -346,12 +346,12 @@ static void pcie_aspm_cap_init(struct pcie_link_state *link, int blacklist)
 	link->latency.l0s = max_t(u32, link->latency.l0s, l0s);
 	link->latency.l1 = max_t(u32, link->latency.l1, l1);
 
+	/* Save default state */
+	link->aspm_default = link->aspm_enabled;
+
 	if (!link->aspm_support)
 		return;
 
-	link->aspm_enabled &= link->aspm_support;
-	link->aspm_default = link->aspm_enabled;
-
 	/* ENDPOINT states*/
 	list_for_each_entry(child, &linkbus->devices, bus_list) {
 		int pos;
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
PCI ASPM: do not clear enabled field by support field, Linux Kernel Mailing ..., (Wed Sep 16, 7:59 am)