From patchwork Mon Nov 27 06:20:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sinan Kaya X-Patchwork-Id: 10075815 X-Patchwork-Delegate: bhelgaas@google.com 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 8EF40602BD for ; Mon, 27 Nov 2017 06:21:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8039B28D4B for ; Mon, 27 Nov 2017 06:21:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 74AD928D5E; Mon, 27 Nov 2017 06:21:20 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 005EC28D4B for ; Mon, 27 Nov 2017 06:21:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751569AbdK0GVS (ORCPT ); Mon, 27 Nov 2017 01:21:18 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:48888 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751313AbdK0GUm (ORCPT ); Mon, 27 Nov 2017 01:20:42 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id D698669B2F; Mon, 27 Nov 2017 06:20:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1511763641; bh=H2FNrbEFBR00et4aWztzNNP7upYvaJy9+PqWBlwIaLk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FMiezS4unCWyB9sldOAAd/U1pMEkCQZRZ/E9QyY8jDvpCY2WZNkEI8ByAYM3Z15Wi swYtkFkx6i4sZoAF98UbRz8vmsMFViJmlN3ucpsuRH2+A+BOFFvmHFuEgDlHFe1le+ K8sWqGqmEf872xKv5+PhtXQ4JHr3wd84TIrfyunU= 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 9128E69B2F; Mon, 27 Nov 2017 06:20:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1511763641; bh=H2FNrbEFBR00et4aWztzNNP7upYvaJy9+PqWBlwIaLk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FMiezS4unCWyB9sldOAAd/U1pMEkCQZRZ/E9QyY8jDvpCY2WZNkEI8ByAYM3Z15Wi swYtkFkx6i4sZoAF98UbRz8vmsMFViJmlN3ucpsuRH2+A+BOFFvmHFuEgDlHFe1le+ K8sWqGqmEf872xKv5+PhtXQ4JHr3wd84TIrfyunU= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 9128E69B2F 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 Cc: linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sinan Kaya , Bjorn Helgaas , linux-kernel@vger.kernel.org (open list) Subject: [PATCH V2 5/7] PCI: add a return type for pci_reset_bridge_secondary_bus() Date: Mon, 27 Nov 2017 01:20:26 -0500 Message-Id: <1511763628-11856-6-git-send-email-okaya@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1511763628-11856-1-git-send-email-okaya@codeaurora.org> References: <1511763628-11856-1-git-send-email-okaya@codeaurora.org> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.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 87e4688..0a9a696 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -4031,9 +4031,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 354b018..539b3af 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1103,7 +1103,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);