From patchwork Fri Sep 16 20:06:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sinan Kaya X-Patchwork-Id: 9336607 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 767AB6089F for ; Fri, 16 Sep 2016 20:06:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 66AB92A001 for ; Fri, 16 Sep 2016 20:06:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5B94C2A091; Fri, 16 Sep 2016 20:06:54 +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 0CC1B2A096 for ; Fri, 16 Sep 2016 20:06:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965397AbcIPUGu (ORCPT ); Fri, 16 Sep 2016 16:06:50 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:46675 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965244AbcIPUGp (ORCPT ); Fri, 16 Sep 2016 16:06:45 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 5010B617C4; Fri, 16 Sep 2016 20:06:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1474056404; bh=1SLn5QiYvHx1R15Gdwlz/MA+VIldNj41D8c0WrCGY9c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZRhn0mZUs1GP17uC/Usc7eySHr2aAaioB4KsZGCoh264iwqwY06MTQVIbYhTakYJq o5SWa2yjUHenenVBvf6LGT3rKCUc7fhAUsXFBb0ExGOyiR/o0jM/hpucg6CWLHayWh 29JAeRdMVEPlR/n6MSuFQjKZpuFd1ZSUwZX00TQE= 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 C2A9A61731; Fri, 16 Sep 2016 20:06:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1474056403; bh=1SLn5QiYvHx1R15Gdwlz/MA+VIldNj41D8c0WrCGY9c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Omk6wGVZYFK3ixuS9RAA7AjAD2mdT/gHI9RUjXAJy8ZLijb8Lih53576TSeGNYPRP /0lGu9fx+CaC+mQ5BC4WygB1HA7nOSKyvzioJUPKVrL+nJpjwMCZqKFr2ZTEsoi71G qFgv5MjUusVDX91n1rHzEPmwJXFWXe6AJDIj9ZwI= DMARC-Filter: OpenDMARC Filter v1.3.1 smtp.codeaurora.org C2A9A61731 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=pass smtp.mailfrom=okaya@codeaurora.org From: Sinan Kaya To: linux-pci@vger.kernel.org, timur@codeaurora.org, cov@codeaurora.org, alex.williamson@redhat.com, vikrams@codeaurora.org Cc: linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sinan Kaya , linux-kernel@vger.kernel.org Subject: [PATCH V2 1/5] PCI/AER: replace pci_reset_bridge_secondary_bus with pci_reset_bus Date: Fri, 16 Sep 2016 16:06:30 -0400 Message-Id: <1474056395-21843-2-git-send-email-okaya@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1474056395-21843-1-git-send-email-okaya@codeaurora.org> References: <1474056395-21843-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 The error handling path is not saving and restoring the settings on other devices getting impacted by a secondary bus reset. Using a better API to take care of this. Signed-off-by: Sinan Kaya --- drivers/pci/pcie/aer/aerdrv.c | 2 +- drivers/pci/pcie/aer/aerdrv_core.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pci/pcie/aer/aerdrv.c b/drivers/pci/pcie/aer/aerdrv.c index 48d21e0..7880cd1 100644 --- a/drivers/pci/pcie/aer/aerdrv.c +++ b/drivers/pci/pcie/aer/aerdrv.c @@ -350,7 +350,7 @@ static pci_ers_result_t aer_root_reset(struct pci_dev *dev) reg32 &= ~ROOT_PORT_INTR_ON_MESG_MASK; pci_write_config_dword(dev, pos + PCI_ERR_ROOT_COMMAND, reg32); - pci_reset_bridge_secondary_bus(dev); + pci_reset_bus(dev->subordinate); dev_printk(KERN_DEBUG, &dev->dev, "Root Port link has been reset\n"); /* Clear Root Error Status */ diff --git a/drivers/pci/pcie/aer/aerdrv_core.c b/drivers/pci/pcie/aer/aerdrv_core.c index 521e39c..0339cc3 100644 --- a/drivers/pci/pcie/aer/aerdrv_core.c +++ b/drivers/pci/pcie/aer/aerdrv_core.c @@ -403,7 +403,7 @@ static pci_ers_result_t broadcast_error_message(struct pci_dev *dev, */ static pci_ers_result_t default_reset_link(struct pci_dev *dev) { - pci_reset_bridge_secondary_bus(dev); + pci_reset_bus(dev->subordinate); dev_printk(KERN_DEBUG, &dev->dev, "downstream link has been reset\n"); return PCI_ERS_RESULT_RECOVERED; }