From patchwork Mon Mar 18 17:37:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yinghai Lu X-Patchwork-Id: 2294631 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 75A4040AFD for ; Mon, 18 Mar 2013 17:37:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752030Ab3CRRhd (ORCPT ); Mon, 18 Mar 2013 13:37:33 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:33715 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751613Ab3CRRhc (ORCPT ); Mon, 18 Mar 2013 13:37:32 -0400 Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r2IHbKgx028927 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 18 Mar 2013 17:37:21 GMT Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r2IHbJhH006317 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 18 Mar 2013 17:37:20 GMT Received: from abhmt118.oracle.com (abhmt118.oracle.com [141.146.116.70]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id r2IHbI9C002330; Mon, 18 Mar 2013 12:37:18 -0500 Received: from linux-siqj.site (/10.159.250.130) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 18 Mar 2013 10:37:18 -0700 From: Yinghai Lu To: Bjorn Helgaas , "Rafael J. Wysocki" Cc: linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, Yinghai Lu , Taku Izumi , Kenji Kaneshige , stable@kernel.org Subject: [PATCH] PCI: Remove not needed check in disable aspm link Date: Mon, 18 Mar 2013 10:37:06 -0700 Message-Id: <1363628226-6679-1-git-send-email-yinghai@kernel.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: References: X-Source-IP: ucsinet22.oracle.com [156.151.31.94] Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Roman reported ath5k does not work anymore on 3.8. Bisected to | commit 8c33f51df406e1a1f7fa4e9b244845b7ebd61fa6 | Author: Taku Izumi | Date: Tue Oct 30 15:27:13 2012 +0900 | | PCI/ACPI: Request _OSC control before scanning PCI root bus | | This patch moves up the code block to request _OSC control in order to | separate ACPI work and PCI work in acpi_pci_root_add(). It make pci_disable_link_state does not work anymore as acpi_disabled is set before pci root bus scanning. It will skip that in quirks and pcie_aspm_sanity_check. We could revert to old logic, but that will make booting path and hotplug path with different aspm_disabled again. Acctually we don't need to check aspm_disabled in disable link, as we already have protection about link state following. https://bugzilla.kernel.org/show_bug.cgi?id=55211 http://article.gmane.org/gmane.linux.kernel.pci/20640 Need it for 3.8 stable. Reported-by: Roman Yepishev Bisected-by: Roman Yepishev Tested-by: Roman Yepishev Signed-off-by: Yinghai Lu Cc: Taku Izumi Cc: Kenji Kaneshige Cc: stable@kernel.org --- drivers/pci/pcie/aspm.c | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 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: linux-2.6/drivers/pci/pcie/aspm.c =================================================================== --- linux-2.6.orig/drivers/pci/pcie/aspm.c +++ linux-2.6/drivers/pci/pcie/aspm.c @@ -493,15 +493,6 @@ static int pcie_aspm_sanity_check(struct return -EINVAL; /* - * If ASPM is disabled then we're not going to change - * the BIOS state. It's safe to continue even if it's a - * pre-1.1 device - */ - - if (aspm_disabled) - continue; - - /* * Disable ASPM for pre-1.1 PCIe device, we follow MS to use * RBER bit to determine if a function is 1.1 version device */ @@ -718,15 +709,11 @@ void pcie_aspm_powersave_config_link(str * pci_disable_link_state - disable pci device's link state, so the link will * never enter specific states */ -static void __pci_disable_link_state(struct pci_dev *pdev, int state, bool sem, - bool force) +static void __pci_disable_link_state(struct pci_dev *pdev, int state, bool sem) { struct pci_dev *parent = pdev->bus->self; struct pcie_link_state *link; - if (aspm_disabled && !force) - return; - if (!pci_is_pcie(pdev)) return; @@ -757,13 +744,13 @@ static void __pci_disable_link_state(str void pci_disable_link_state_locked(struct pci_dev *pdev, int state) { - __pci_disable_link_state(pdev, state, false, false); + __pci_disable_link_state(pdev, state, false); } EXPORT_SYMBOL(pci_disable_link_state_locked); void pci_disable_link_state(struct pci_dev *pdev, int state) { - __pci_disable_link_state(pdev, state, true, false); + __pci_disable_link_state(pdev, state, true); } EXPORT_SYMBOL(pci_disable_link_state); @@ -781,7 +768,7 @@ void pcie_clear_aspm(struct pci_bus *bus __pci_disable_link_state(child, PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1 | PCIE_LINK_STATE_CLKPM, - false, true); + false); } }