Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp651591imm; Fri, 22 Jun 2018 03:00:55 -0700 (PDT) X-Google-Smtp-Source: ADUXVKICfJjPjukxOd3RXChbaw1uslA15qgYpuuaNIUJA5KZS1Xeex2qOAZ4ufTqSo9uyDnwQmRz X-Received: by 2002:a65:4287:: with SMTP id j7-v6mr818797pgp.144.1529661655607; Fri, 22 Jun 2018 03:00:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529661655; cv=none; d=google.com; s=arc-20160816; b=sPZMPeE61S1jlM9Op0WDmVMlZy+d10Pr7ouWxM/a5dttlL0zsUvTr+6BsZYziiJO+4 d9MlwPaAOP/Rk6pAQ0h51gC52cddwMndUoquLAT1tS0Dpeb2DIRB10qTywMeSW2WYT3W UfjkgFJ3Y5S0tPFf1W/H8UrGIATnNcMjMLVSCSjlA6O1Er7KqJsbHmyD7fKTAbam2e8/ WMDklhLErhGL72PxUZ/Lpl/pOLpIe5JM0y5EktEIl5rafQGmxcp3emUlXoTYGZu2PHnO cWgjRFF726hAJh+kK7ybrAWYBs+fqd3DWtbygmcm1u75gJrH2yYBKUgkaOlDqduhjiDQ HIZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=m2ibt1B3yHFBfst/yq22v2eGGvsJ3py56+0JJuI43Cs=; b=Ssrbo5K2v2l8q484V3mGHno8ca3SG3YPzY7TxM5diVvoeFX+Qcry6iVSl2R1xd8hiE osfNbz9WDSt3dyb/fJm/k/WMcm60MB8kvxfDealiaihKzUUkA8b+T/FRGUrWXdV+X7IQ wj7+EdKBd//Ac3tGs0j2YLDt9xsad/hpa9F8aBrINeeVKTQ7EVwNXeJSulzC7ysBQWO7 42LAg+QvWgBdJ66DeHDiW8NMZmg1v7DW5BfKt7uW8pFWd7FS7iVYpxgu5Vtlq1kk78bF Xk+i82/LtkCInR3T1AHDZSfoTCupgJog5ptKiW7cWcA4V9mqodbCvEcH+daEa9A1a1X4 AfJA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a11-v6si6757267pfo.68.2018.06.22.03.00.40; Fri, 22 Jun 2018 03:00:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933382AbeFVJ7A (ORCPT + 99 others); Fri, 22 Jun 2018 05:59:00 -0400 Received: from alexa-out-sd-02.qualcomm.com ([199.106.114.39]:39596 "EHLO alexa-out-sd-02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753275AbeFVJ6V (ORCPT ); Fri, 22 Jun 2018 05:58:21 -0400 X-IronPort-AV: E=Sophos;i="5.51,256,1526367600"; d="scan'208";a="5079205" Received: from unknown (HELO ironmsg01-sd.qualcomm.com) ([10.53.140.141]) by alexa-out-sd-02.qualcomm.com with ESMTP; 22 Jun 2018 02:58:21 -0700 Received: from westreach.qualcomm.com ([10.228.196.125]) by ironmsg01-sd.qualcomm.com with ESMTP; 22 Jun 2018 02:58:19 -0700 Received: by westreach.qualcomm.com (Postfix, from userid 467151) id 50A551F33; Fri, 22 Jun 2018 05:58:18 -0400 (EDT) From: Oza Pawandeep To: Bjorn Helgaas , Philippe Ombredanne , Thomas Gleixner , Greg Kroah-Hartman , Kate Stewart , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Dongdong Liu , Keith Busch , Wei Zhang , Sinan Kaya , Timur Tabi Cc: Oza Pawandeep Subject: [PATCH v2 6/6] PCI/PORTDRV: Remove ERR_FATAL handling from pcie_portdrv_slot_reset() Date: Fri, 22 Jun 2018 05:58:14 -0400 Message-Id: <1529661494-20936-7-git-send-email-poza@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1529661494-20936-1-git-send-email-poza@codeaurora.org> References: <1529661494-20936-1-git-send-email-poza@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We are handling ERR_FATAL by resetting the Link in software,skipping the driver pci_error_handlers callbacks, removing the devices from the PCI subsystem, and re-enumerating, because of, no need to handle pci_channel_io_frozen case anymore. Besides the walk on the bus is happening on subordinates, inside broadcast_error_message(), which means that pcie_portdrv_slot_reset() is never called for RP, and now since the all the devices are removed under this downstream link, we can safely get rid of ERR_FATAL handling code in pcie_portdrv_slot_reset(). Signed-off-by: Oza Pawandeep diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c index 973f1b8..b970a6d 100644 --- a/drivers/pci/pcie/portdrv_pci.c +++ b/drivers/pci/pcie/portdrv_pci.c @@ -42,17 +42,6 @@ __setup("pcie_ports=", pcie_port_setup); /* global data */ -static int pcie_portdrv_restore_config(struct pci_dev *dev) -{ - int retval; - - retval = pci_enable_device(dev); - if (retval) - return retval; - pci_set_master(dev); - return 0; -} - #ifdef CONFIG_PM static int pcie_port_runtime_suspend(struct device *dev) { @@ -163,13 +152,6 @@ static pci_ers_result_t pcie_portdrv_mmio_enabled(struct pci_dev *dev) static pci_ers_result_t pcie_portdrv_slot_reset(struct pci_dev *dev) { /* If fatal, restore cfg space for possible link reset at upstream */ - if (dev->error_state == pci_channel_io_frozen) { - dev->state_saved = true; - pci_restore_state(dev); - pcie_portdrv_restore_config(dev); - pci_enable_pcie_error_reporting(dev); - } - return PCI_ERS_RESULT_RECOVERED; } -- 2.7.4