提交 b127bd55 编写于 作者: K Kenji Kaneshige 提交者: Jesse Barnes

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: NShaohua Li <shaohua.li@intel.com>
Signed-off-by: NKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
上级 6f1186be
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册