From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756174Ab1CRF3n (ORCPT ); Fri, 18 Mar 2011 01:29:43 -0400 Received: from fgwmail5.fujitsu.co.jp ([192.51.44.35]:46296 "EHLO fgwmail5.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754932Ab1CRF3h (ORCPT ); Fri, 18 Mar 2011 01:29:37 -0400 X-SecurityPolicyCheck-FJ: OK by FujitsuOutboundMailChecker v1.3.1 Message-ID: <4D82EDAC.8070307@jp.fujitsu.com> Date: Fri, 18 Mar 2011 14:29:16 +0900 From: Kenji Kaneshige User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 To: Naga Chumbalkar CC: jbarnes@virtuousgeek.org, rjw@sisk.pl, mjg59@srcf.ucam.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Subject: Re: [RFC][PATCH v2]: PCI: PCIe links may not get configured for ASPM under POWERSAVE mode References: <20110318041801.2349.33357.sendpatchset@nchumbalkar.americas.hpqcorp.net> In-Reply-To: <20110318041801.2349.33357.sendpatchset@nchumbalkar.americas.hpqcorp.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org (2011/03/18 13:21), Naga Chumbalkar wrote: > v2 -> v1: > . Kept the logic in pci_raw_set_power_state > . Changed the ASPM enabling logic > . Modified the text that describes the problem > > v1 : http://marc.info/?l=linux-pci&m=130013164703283&w=2 > > The assumption made in commit 41cd766b065970ff6f6c89dd1cf55fa706c84a3d > (PCI: Don't enable aspm before drivers have had a chance to veto it) that > pci_enable_device() will result in re-configuring ASPM when aspm_policy is > POWERSAVE is no longer valid. This is due to commit > 97c145f7c87453cec90e91238fba5fe2c1561b32 (PCI: read current power state > at enable time) which resets dev->current_state to D0. This makes the > equality check (below) become true, so pcie_aspm_pm_state_change() never > gets called. > ./drivers/pci/pci.c: pci_raw_set_pci_power_state() > 546 /* Check if we're already there */ > 547 if (dev->current_state == state) > 548 return 0; > > So OSPM doesnn't configure the PCIe links for ASPM. > > The patch below does the following: > At the end of each Root Bridge scan make a call to configure ASPM when the > ASPM policy is set to "powersave" mode. Note that if a previous pass had > completed the configuration for all devices under that Bridge then the > configuration will not take place again because pcie_config_aspm_link() > checks to see if the link is already in the requested state. > We won't reconfigure ASPM when _OSC control is not granted. Which _OSC controls do we need for configuring ASPM? Regards, Kenji Kaneshige