From patchwork Fri Aug 17 23:35:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 1340061 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 563783FC81 for ; Fri, 17 Aug 2012 23:35:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752688Ab2HQXfx (ORCPT ); Fri, 17 Aug 2012 19:35:53 -0400 Received: from mail-fa0-f74.google.com ([209.85.161.74]:49948 "EHLO mail-fa0-f74.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752585Ab2HQXfw (ORCPT ); Fri, 17 Aug 2012 19:35:52 -0400 Received: by faem1 with SMTP id m1so116751fae.1 for ; Fri, 17 Aug 2012 16:35:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:to:from:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding; bh=5Br9TyR0nSA+uKR8QAoWHUIxTG7dPuCyA/hkeB2q2N4=; b=J4sJWaD61m1jE6zqOhUa9ZzL+UHX4lSXos09Wm4cqotwJ8ITBYstKAcgjhTKKfQkD6 OurBDQLLch2dt12ssQ0TZUdef86XVnzvVm0t1uV28LX3TKQAaOxH4+lEQPvt1FjJiEaC 4xAeQu13p2uz0RiaocaPou3oQGGX2COx8n0PPeH+uEiM7gPWGFsT88kfWjn+oYvTa+IY 3MyqJyWKs1dB7M78bSgOpEwSuPxi4GwW8IQ2TK7u2XxitdVgEo8zVS0MJrrDhTR3mhTN TLaObhcLop+aQbLSM5XFo1YE/PGDACxc21fkOvurQRo03t0+GWqHCRu142gDfMATArkI 1ZOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:to:from:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding :x-gm-message-state; bh=5Br9TyR0nSA+uKR8QAoWHUIxTG7dPuCyA/hkeB2q2N4=; b=WQdN5Ul9aVRE5/IzIedvg662ny8TGhJDNil9H5S6S/B1CbkBGCZFJANNIK2cEESRip 6NeCsiaUZJPxuf3bx102poD/r5DfM2O12wBreew+RSAROQtj/3WHbfgqFoDPPCztwMrp aHs8bu/7PFXm2lTj/8Z8HJ4gGDAB5tF0JpzUxTMEERuRCtNPQ5PU9sv1kdgT0mbGElbJ LiiAZg6zMnljIsMnmjH9pzY92csdtQlJ8NqjzhWSdCENodVr7NmX8sFHcM41MJ/YZE4X BbeG2MrLlXs4MbYc8zfXCRe3lR3nc6nFasTSi4aU2oZz+Z/viiE07GNTDCjWmRLZISXC XEEA== Received: by 10.180.103.197 with SMTP id fy5mr704456wib.1.1345246551054; Fri, 17 Aug 2012 16:35:51 -0700 (PDT) Received: by 10.180.103.197 with SMTP id fy5mr704449wib.1.1345246551018; Fri, 17 Aug 2012 16:35:51 -0700 (PDT) Received: from hpza9.eem.corp.google.com ([74.125.121.33]) by gmr-mx.google.com with ESMTPS id d5si11750963eep.0.2012.08.17.16.35.51 (version=TLSv1/SSLv3 cipher=AES128-SHA); Fri, 17 Aug 2012 16:35:51 -0700 (PDT) Received: from bhelgaas.mtv.corp.google.com (bhelgaas.mtv.corp.google.com [172.18.96.155]) by hpza9.eem.corp.google.com (Postfix) with ESMTP id A66705C0050; Fri, 17 Aug 2012 16:35:50 -0700 (PDT) Received: from bhelgaas.mtv.corp.google.com (unknown [IPv6:::1]) by bhelgaas.mtv.corp.google.com (Postfix) with ESMTP id 142C41801BB; Fri, 17 Aug 2012 16:35:50 -0700 (PDT) Subject: [PATCH v2 01/16] PCI: acpiphp: Stop disabling bridges on remove To: linux-pci@vger.kernel.org From: Bjorn Helgaas Cc: linux-pcmcia@lists.infradead.org, Yinghai Lu , Kenji Kaneshige Date: Fri, 17 Aug 2012 17:35:50 -0600 Message-ID: <20120817233549.10973.85915.stgit@bhelgaas.mtv.corp.google.com> In-Reply-To: <20120817233100.10973.59521.stgit@bhelgaas.mtv.corp.google.com> References: <20120817233100.10973.59521.stgit@bhelgaas.mtv.corp.google.com> User-Agent: StGit/0.15 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQmTsMWvnXi3PLFpZG8BVKcueEyZe/Q/8zDf+HBltzIUYQqCb+hLPfxuEhC3EQxJfvp912zjP2Ir7FRSLsZifGmZt1jF7/k2BnzxYTBCdIgZMQ0HgJE6bKL1eaUNWrR5l5BP0aZ9Oq7d9ogTreau+Im1v1YPUR/VnMFGqH3JSq9tcrr/qSsL/8M3rcAPsZXarSrjfjwvJAGCylyPjkPF8YtbcK+53w== Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org acpiphp_disable_slot() turns off power to the slot immediately after calling disable_device(), so there's no point in disabling any bridges below the slot: we're about to turn them off anyway. Signed-off-by: Bjorn Helgaas --- drivers/pci/hotplug/acpiphp_glue.c | 15 --------------- 1 files changed, 0 insertions(+), 15 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 diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c index ad6fd66..c25291c 100644 --- a/drivers/pci/hotplug/acpiphp_glue.c +++ b/drivers/pci/hotplug/acpiphp_glue.c @@ -869,17 +869,6 @@ static int __ref enable_device(struct acpiphp_slot *slot) return retval; } -static void disable_bridges(struct pci_bus *bus) -{ - struct pci_dev *dev; - list_for_each_entry(dev, &bus->devices, bus_list) { - if (dev->subordinate) { - disable_bridges(dev->subordinate); - pci_disable_device(dev); - } - } -} - /* return first device in slot, acquiring a reference on it */ static struct pci_dev *dev_in_slot(struct acpiphp_slot *slot) { @@ -932,10 +921,6 @@ static int disable_device(struct acpiphp_slot *slot) */ while ((pdev = dev_in_slot(slot))) { pci_stop_bus_device(pdev); - if (pdev->subordinate) { - disable_bridges(pdev->subordinate); - pci_disable_device(pdev); - } __pci_remove_bus_device(pdev); pci_dev_put(pdev); }