From patchwork Tue Jan 2 17:00:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sinan Kaya X-Patchwork-Id: 10141077 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 656DB6034B for ; Tue, 2 Jan 2018 17:03:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5445A26AE3 for ; Tue, 2 Jan 2018 17:03:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 48FDA28C84; Tue, 2 Jan 2018 17:03:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 922D926AE3 for ; Tue, 2 Jan 2018 17:03:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=4oCE0PtCCyhwvEVpHmKZO/H16yg5fMkysXNh4BSPCXk=; b=NPIAuhxp+zY2yl0AQWJNzGgfYT jqZ7ZHIB7FdczmvRmiJQqOsMDxuY7dwEi9B9C6OzuEGyoP4v1sxGAvgHRmN0LAEWWbbchKeUdbdy0 oKlwQB9kh9+8gqQtFlKzZ0DjpzE0fsrvRLDFuuMn7Q2hf0wK4HCir3mXvwE+UVsm15XKBz51cNTar TzTDnKvAvkKIwSZ6cKExsO8w7zkfBRONBn1bRes5D8rCIlskaMElqsz9ZvTze8Q4j9TOutgQr3GMd 8wO0VLJ0T9Lcbt26HUh8IqvZfsmhLlvnGMug9fnTxyJA/Gz4//k3bI5a3P+nnRJOSnljCpZMqWbeb nC6hozLw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eWPyd-0003AZ-LE; Tue, 02 Jan 2018 17:03:47 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eWPvt-0000RY-5G for linux-arm-kernel@lists.infradead.org; Tue, 02 Jan 2018 17:01:19 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 00DE960B77; Tue, 2 Jan 2018 17:00:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1514912437; bh=PhK5rJYAeXtirJ/ksfjXWigBydVFxbPAsktLTxwlQuw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z14T2xBi7uPAlo2o/7c2efk7ozmRoBMYWbW3cEoJ62/wOJmgWb2ayRqtnIVrsyb3L TCBlcmlueXSXUKFLJtErPSQuEzOXUNqAPMTPnUUuH9nX1y0NC2JKnNl0CbpOTViamv b6h17UtLOt8ywZrnssOF9O1z7Ogh6FIH3irUdB7M= Received: from drakthul.qualcomm.com (global_nat1_iad_fw.qualcomm.com [129.46.232.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: okaya@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id B0C186024C; Tue, 2 Jan 2018 17:00:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1514912436; bh=PhK5rJYAeXtirJ/ksfjXWigBydVFxbPAsktLTxwlQuw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PwZKe0pfmR2zeK4uv8NiLGo3Jvdx3Iq6BbXgB4WIQ49J6DRL+pmQcshYTiqNdi17f Ry3ww/BLWRMBhk+F2WltlX/BkbGPso4XOx2j6DUxOXGF7IJE23O9h49coK9Iwn70Mb Qk08tl1wjUzx6Vk26kiKH+qzTyWlX/P60TQnEEKY= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org B0C186024C Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=okaya@codeaurora.org From: Sinan Kaya To: linux-pci@vger.kernel.org, timur@codeaurora.org Subject: [PATCH V3 5/6] PCI: Add a return type for pci_reset_bridge_secondary_bus() Date: Tue, 2 Jan 2018 12:00:22 -0500 Message-Id: <1514912423-13341-6-git-send-email-okaya@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1514912423-13341-1-git-send-email-okaya@codeaurora.org> References: <1514912423-13341-1-git-send-email-okaya@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180102_090057_970757_092F8582 X-CRM114-Status: GOOD ( 11.45 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sinan Kaya , linux-arm-msm@vger.kernel.org, Bjorn Helgaas , open list , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Getting ready to return an error from pci_reset_bridge_secondary_bus() when device is unreachable. Signed-off-by: Sinan Kaya Reviewed-by: Christoph Hellwig --- drivers/pci/pci.c | 4 +++- include/linux/pci.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 09eae93..eae04aa 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -4157,9 +4157,11 @@ void __weak pcibios_reset_secondary_bus(struct pci_dev *dev) * Use the bridge control register to assert reset on the secondary bus. * Devices on the secondary bus are left in power-on state. */ -void pci_reset_bridge_secondary_bus(struct pci_dev *dev) +int pci_reset_bridge_secondary_bus(struct pci_dev *dev) { pcibios_reset_secondary_bus(dev); + + return 0; } EXPORT_SYMBOL_GPL(pci_reset_bridge_secondary_bus); diff --git a/include/linux/pci.h b/include/linux/pci.h index 0c1335a..dbd2ad2 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1094,7 +1094,7 @@ int pcie_get_minimum_link(struct pci_dev *dev, enum pci_bus_speed *speed, int pci_try_reset_bus(struct pci_bus *bus); void pci_reset_secondary_bus(struct pci_dev *dev); void pcibios_reset_secondary_bus(struct pci_dev *dev); -void pci_reset_bridge_secondary_bus(struct pci_dev *dev); +int pci_reset_bridge_secondary_bus(struct pci_dev *dev); void pci_update_resource(struct pci_dev *dev, int resno); int __must_check pci_assign_resource(struct pci_dev *dev, int i); int __must_check pci_reassign_resource(struct pci_dev *dev, int i, resource_size_t add_size, resource_size_t align);