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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>

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

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;

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

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux