From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rcsinet15.oracle.com ([148.87.113.117]:39498 "EHLO rcsinet15.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754071Ab2CJHDZ (ORCPT ); Sat, 10 Mar 2012 02:03:25 -0500 From: Yinghai Lu To: Jesse Barnes , x86 Cc: Bjorn Helgaas , Andrew Morton , Linus Torvalds , Greg Kroah-Hartman , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Yinghai Lu Subject: [PATCH v2 35/37] PCI: Make /sys/bus/pci/rescan rescan root Date: Fri, 9 Mar 2012 23:00:35 -0800 Message-Id: <1331362837-10740-36-git-send-email-yinghai@kernel.org> In-Reply-To: <1331362837-10740-1-git-send-email-yinghai@kernel.org> References: <1331362837-10740-1-git-send-email-yinghai@kernel.org> Sender: linux-pci-owner@vger.kernel.org List-ID: It will rediscover removed pci root buses. Signed-off-by: Yinghai Lu --- drivers/pci/pci-sysfs.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index 4d122cb..fc0a7de 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c @@ -284,6 +284,7 @@ msi_bus_store(struct device *dev, struct device_attribute *attr, #ifdef CONFIG_HOTPLUG static DEFINE_MUTEX(pci_remove_rescan_mutex); +void __weak arch_pci_root_rescan(void) { } static ssize_t bus_rescan_store(struct bus_type *bus, const char *buf, size_t count) { @@ -295,6 +296,7 @@ static ssize_t bus_rescan_store(struct bus_type *bus, const char *buf, if (val) { mutex_lock(&pci_remove_rescan_mutex); + arch_pci_root_rescan(); while ((b = pci_find_next_bus(b)) != NULL) pci_rescan_bus(b); mutex_unlock(&pci_remove_rescan_mutex); -- 1.7.7