From patchwork Wed Jul 22 01:12:54 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kenji Kaneshige X-Patchwork-Id: 36662 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n6M1DEMp024851 for ; Wed, 22 Jul 2009 01:13:14 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751220AbZGVBNN (ORCPT ); Tue, 21 Jul 2009 21:13:13 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751993AbZGVBNN (ORCPT ); Tue, 21 Jul 2009 21:13:13 -0400 Received: from fgwmail7.fujitsu.co.jp ([192.51.44.37]:37973 "EHLO fgwmail7.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751220AbZGVBNM (ORCPT ); Tue, 21 Jul 2009 21:13:12 -0400 Received: from m6.gw.fujitsu.co.jp ([10.0.50.76]) by fgwmail7.fujitsu.co.jp (Fujitsu Gateway) with ESMTP id n6M1DCMQ007743 for (envelope-from kaneshige.kenji@jp.fujitsu.com); Wed, 22 Jul 2009 10:13:12 +0900 Received: from smail (m6 [127.0.0.1]) by outgoing.m6.gw.fujitsu.co.jp (Postfix) with ESMTP id DB2B845DE4E for ; Wed, 22 Jul 2009 10:13:11 +0900 (JST) Received: from s6.gw.fujitsu.co.jp (s6.gw.fujitsu.co.jp [10.0.50.96]) by m6.gw.fujitsu.co.jp (Postfix) with ESMTP id AA48745DE51 for ; Wed, 22 Jul 2009 10:13:11 +0900 (JST) Received: from s6.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s6.gw.fujitsu.co.jp (Postfix) with ESMTP id 58E0E1DB8041 for ; Wed, 22 Jul 2009 10:13:11 +0900 (JST) Received: from m108.s.css.fujitsu.com (m108.s.css.fujitsu.com [10.249.87.108]) by s6.gw.fujitsu.co.jp (Postfix) with ESMTP id 96EB6E08002 for ; Wed, 22 Jul 2009 10:13:10 +0900 (JST) Received: from m108.css.fujitsu.com (m108 [127.0.0.1]) by m108.s.css.fujitsu.com (Postfix) with ESMTP id 6E4F5428058; Wed, 22 Jul 2009 10:13:10 +0900 (JST) Received: from [127.0.0.1] (unknown [10.124.100.137]) by m108.s.css.fujitsu.com (Postfix) with ESMTP id 009F4428057; Wed, 22 Jul 2009 10:13:09 +0900 (JST) X-SecurityPolicyCheck-FJ: OK by FujitsuOutboundMailChecker v1.3.1 Received: from KANE-LIFEBOOK[10.124.100.137] by KANE-LIFEBOOK (FujitsuOutboundMailChecker v1.3.1/9992[10.124.100.137]); Wed, 22 Jul 2009 10:12:58 +0900 (JST) Message-ID: <4A666796.4020100@jp.fujitsu.com> Date: Wed, 22 Jul 2009 10:12:54 +0900 From: Kenji Kaneshige User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 To: Jesse Barnes , "Li, Shaohua" , "linux-pci@vger.kernel.org" Subject: [PATCH 1/7] PCI ASPM: do not clear enabled field by support field References: <4A66673A.2070409@jp.fujitsu.com> In-Reply-To: <4A66673A.2070409@jp.fujitsu.com> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org 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 --- 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 Index: 20090721/drivers/pci/pcie/aspm.c =================================================================== --- 20090721.orig/drivers/pci/pcie/aspm.c +++ 20090721/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;