Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp906948imm; Wed, 18 Jul 2018 12:51:08 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcQSOoKn8+tqXucYHUuwlpyFSKRd6UGkOoY0iVEyUKCWXfYDZUn3CHTTktAGUf5zxOWEvJU X-Received: by 2002:a62:1d97:: with SMTP id d145-v6mr6612171pfd.101.1531943468744; Wed, 18 Jul 2018 12:51:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531943468; cv=none; d=google.com; s=arc-20160816; b=NY8c6qFsJVXRKIJDp1R1eNrOigq7n0eIcIKNZ8aeG4m4CrdtKivPJQWjNuCaOhsGx9 C64QRY59S68GyrBBvpCBwTUrukti67hkXZRimfPbJWMw2CMz3fo7WXqSBylll3J/gP2I CKQuNf900QOCiEBWAz3+Hgqs6/lyWnDGlpE4SpBY4BsozwurbAy1roZX/mUnYLa8WOsW niAV7iS1ZCwvg7YjOVJgZNAS3CF9FuaZyCSUzHRRoFrgmvVgMPIZS1pAZB5w5stsJkds onHxNR665ETaTyGdzT5Fn8DwW9FLgZ6t84HPERZplqLOtvJFiqS2B//1nW0vJOSop05m TpNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:cc:to:from :subject:dkim-signature:arc-authentication-results; bh=Rn85FKkNIK2VIHyeKluTGvAOLTjcwRqc4wCIOU6FDOk=; b=d9y37dpVhC0b9VYB6fQTeuTCiFbDGa/rztRX0iiSrXA+p3xgJrtWwWAC8Kzt/8+Iqx jhYjcMPK5QgpLa+ZXLTQs7uoArIeTCL2/pgFgecEqfYI0rVkqMVHBWR2i9kqGTQHXubU SHgC/237iAmpq/X8dfCCRiGfPbtKajZHZPqnICC+E/RDvWu1JxxSNwyYY0liWKAKpJ4V Xm4OqNKpJCcbsRGf8okwnY1V3XsjfUtOXeOYRtuDs4IEcZl115Akh8NepdE5MOG+Wxwc Nu1INpLfnmgRTSvkrHRWAMXBiHHW9c7F8MI0Zs3EXseg0DlLrZQ7+w2+qKEY2ZTcnhS9 k4iQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=N7g25xee; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p64-v6si3915009pga.25.2018.07.18.12.50.30; Wed, 18 Jul 2018 12:51:08 -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; dkim=pass header.i=@kernel.org header.s=default header.b=N7g25xee; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731031AbeGRUY2 (ORCPT + 99 others); Wed, 18 Jul 2018 16:24:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:34122 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727009AbeGRUY2 (ORCPT ); Wed, 18 Jul 2018 16:24:28 -0400 Received: from localhost (unknown [69.71.4.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A669F20850; Wed, 18 Jul 2018 19:45:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1531943105; bh=QK/WYYzr9tMS7ubEvjx7MfzXGJgeo6U7TFaH3kcs40E=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=N7g25xeeXgfOzRoY6QvP5GBnghd9sJxpunoY+sTdIRDmbizHPhvzzWGKx8FyFIPkq b4kP/1wafKL0s0vfUQVdTUM/tTxZO0xpRF421v/lVlNtcUHdeeRj5XEbpnCpbJa8A1 VgTywYmjjS8aY6gUJ4vAlmNu2v+k3kIfFjp0WuPc= Subject: [PATCH v3 7/7] PCI/portdrv: Remove pcie_portdrv_err_handler.slot_reset From: Bjorn Helgaas To: Oza Pawandeep Cc: Philippe Ombredanne , Thomas Gleixner , Greg Kroah-Hartman , Kate Stewart , Dongdong Liu , Keith Busch , Wei Zhang , Sinan Kaya , Timur Tabi , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Date: Wed, 18 Jul 2018 14:45:04 -0500 Message-ID: <153194310441.191586.1465977925038330272.stgit@bhelgaas-glaptop.roam.corp.google.com> In-Reply-To: <153194245964.191586.14782253252654776509.stgit@bhelgaas-glaptop.roam.corp.google.com> References: <153194245964.191586.14782253252654776509.stgit@bhelgaas-glaptop.roam.corp.google.com> User-Agent: StGit/0.18 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Oza Pawandeep The pci_error_handlers.slot_reset() callback is only used for non-bridge devices (see broadcast_error_message()). Since portdrv only binds to bridges, we don't need pcie_portdrv_slot_reset(), so remove it. Signed-off-by: Oza Pawandeep [bhelgaas: changelog, remove pcie_portdrv_slot_reset() completely] Signed-off-by: Bjorn Helgaas --- drivers/pci/pcie/portdrv_pci.c | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c index 973f1b80a038..b78840f54a9b 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) { @@ -160,19 +149,6 @@ static pci_ers_result_t pcie_portdrv_mmio_enabled(struct pci_dev *dev) return PCI_ERS_RESULT_RECOVERED; } -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; -} - static int resume_iter(struct device *device, void *data) { struct pcie_device *pcie_device; @@ -208,7 +184,6 @@ static const struct pci_device_id port_pci_ids[] = { { static const struct pci_error_handlers pcie_portdrv_err_handler = { .error_detected = pcie_portdrv_error_detected, .mmio_enabled = pcie_portdrv_mmio_enabled, - .slot_reset = pcie_portdrv_slot_reset, .resume = pcie_portdrv_err_resume, };