diff mbox

[1/7] PCI ASPM: do not clear enabled field by support field

Message ID 4A8B5C0B.5000500@jp.fujitsu.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Kenji Kaneshige Aug. 19, 2009, 1:57 a.m. UTC
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.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>

---
 drivers/pci/pcie/aspm.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Jesse Barnes Aug. 25, 2009, 1:13 a.m. UTC | #1
On Wed, 19 Aug 2009 10:57:31 +0900
Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> wrote:

> 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.

Applied this series to linux-next, thanks.
diff mbox

Patch

Index: 20090818/drivers/pci/pcie/aspm.c
===================================================================
--- 20090818.orig/drivers/pci/pcie/aspm.c
+++ 20090818/drivers/pci/pcie/aspm.c
@@ -346,12 +346,12 @@  static void pcie_aspm_cap_init(struct pc
 	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;