Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1530393pxk; Fri, 2 Oct 2020 11:52:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzOzEpCvDwkgy2kIeV4wcVRQM21cmvJSvCDM+SAoze2AppZ0ZhjAjs8Lf3pJ2MjhRnT9ugQ X-Received: by 2002:a50:8e17:: with SMTP id 23mr3877145edw.42.1601664775359; Fri, 02 Oct 2020 11:52:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601664775; cv=none; d=google.com; s=arc-20160816; b=bNtERqxxA9RA7zGZVdp0JiyQgfOzNpvcCFh2BQLXC+OB1vPv+a30EoRgfib9C/Lqxi 0B2wc7SXJsTFBXBs/O8dzidMO3GZFis9DZU/oA/alJoQn5k0HUlf33W21QGB+/qBBDam 5/3XdL7IBGPRlb6ZRvR8JwhL0hvcKbReTcUhVHcycmHYmfNmseTnkyu+SelkcY+Rtazm qWLhiZSWuSZNiIOLTd2qt8ffNUqRqjWuhUJeXFe7wzoSg5VuRo9fGcMqcFJmG9dqD3W1 KHaZSl0gh7APpwO72CQBIzD7Df5s/woOQbq8iG0e1Qoa/lV+WAVFkFBFRtJuptsXSR7O qcJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=FYJAyl/MCQ7ZZ3uczTR1M/sIuCBUsCHpedex+XRt07c=; b=bW/pcXEHKOGxNA5mQiolwTzElMx729YAvT//aWDmAMhfyizXGSA+5AdOuiLNc6F9QB nZUtgvM50fKb8xMi/Cr+zMbjixtUKep9G7MH5Dvz7uNumnCcM/TNZ37MAJm9stMymZt2 m0YSbUIFw6NVrX7vozOIbXKbltAKwtbi8eL+fXxfYHeXtNK+0zElbybmYrZvnyGy7/Lu ngagL2Ig7IAUtXvyo6CuKZ7hqKjcTaBvLkTtOQ57TU+OOiCCSJWrcMJjkIrEh7n07RT+ vDQ78LaKWEk1zLSExN+kihKLb1YGLksp41fC+N5juUecnVUJYCE3Bd/jjRgeagTC+uef mNAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oregontracks.org header.s=fm1 header.b=TRHXaDSX; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=LPcxwMiZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a2si1694954edm.349.2020.10.02.11.52.32; Fri, 02 Oct 2020 11:52:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@oregontracks.org header.s=fm1 header.b=TRHXaDSX; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=LPcxwMiZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388490AbgJBSsi (ORCPT + 99 others); Fri, 2 Oct 2020 14:48:38 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:55057 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388448AbgJBSsX (ORCPT ); Fri, 2 Oct 2020 14:48:23 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id A46895C0164; Fri, 2 Oct 2020 14:48:21 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Fri, 02 Oct 2020 14:48:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= oregontracks.org; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=fm1; bh=FYJAyl/MCQ7ZZ3uczTR1M/sIuCBUsCHpedex+XRt07c=; b=TRHXa DSXC+yyGTGixVjy1uTe9VoOe2iqjmLZSG3ILCvh+3uoDVSuj6DqynWicC3GRtoIK LpIea3QQXwAHRGv0ZlMxewQrOh0YCICgE5pVf3P62CqDCwLoDx4Cx+W38Q2l12fC 5vcAD8L/nx/fiUI5U710tEkgE1FNLbDLgwaXIjbdmJe0ttst5Lt0EYMu7nahsuq2 RXQ4wotB/kQckRIbY6GbOaeWPYX0Nu1gFkZPuLGtIPQn0VQ3Hz1cW+jgx/jLqYDu v4J3+1o6ZgaWwGPnfyX8Aq1kxIfP7/YRlwFd1vGCaZ/cLrwldtWmnUmxwPhZElXg xhbpt6/+LPePI4VBA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=FYJAyl/MCQ7ZZ3uczTR1M/sIuCBUsCHpedex+XRt07c=; b=LPcxwMiZ dBZT8zELBc7/LiScvuKSHpa1iNmnkm7ap9jH3ts0PzYxrEQYy9Cey6gEbWRtzE11 fvDIbmJ6Rgof7hpBfg/2DuZpK8oikPNFZWY0K5VTN6dzNKXtnyfk9/l9bhu3oig3 5bS7I0/vGhxS00ZauY27c9mMXq5rpG82sKgGlQpF0lbVeEYZVudVw6CeOS9ZJ0Qf 1uqPQlcQ1IbSNUp4zGPyJRdL6DtNanuarCL63HTnV9ykgoQ/QbmHoJtc5E4qPzl/ 167WIShR9DXcEcXXquauhXX6y/MN7GQPns0fnydA4Iz6bXYpo0KugTcc3P4UH2tw 3mcNqrR/qXeeOw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrfeeigdduvdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomhepufgvrghnucggucfmvghllhgvhicuoehsvggrnhhvkhdruggv vhesohhrvghgohhnthhrrggtkhhsrdhorhhgqeenucggtffrrghtthgvrhhnpeehkeffte eiudeiffelkeelvefftdelhfeitdeigeffleeufedvgfegvdefvedtteenucfkphepvdeg rddvtddrudegkedrgeelnecuvehluhhsthgvrhfuihiivgepuddunecurfgrrhgrmhepmh grihhlfhhrohhmpehsvggrnhhvkhdruggvvhesohhrvghgohhnthhrrggtkhhsrdhorhhg X-ME-Proxy: Received: from arch-ashland-svkelley.hsd1.or.comcast.net (c-24-20-148-49.hsd1.or.comcast.net [24.20.148.49]) by mail.messagingengine.com (Postfix) with ESMTPA id F3352306468A; Fri, 2 Oct 2020 14:48:18 -0400 (EDT) From: Sean V Kelley To: bhelgaas@google.com, Jonathan.Cameron@huawei.com, rafael.j.wysocki@intel.com, ashok.raj@intel.com, tony.luck@intel.com, sathyanarayanan.kuppuswamy@intel.com, qiuxu.zhuo@intel.com Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Sean V Kelley Subject: [PATCH v8 14/14] PCI/AER: Add RCEC AER error injection support Date: Fri, 2 Oct 2020 11:47:35 -0700 Message-Id: <20201002184735.1229220-15-seanvk.dev@oregontracks.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201002184735.1229220-1-seanvk.dev@oregontracks.org> References: <20201002184735.1229220-1-seanvk.dev@oregontracks.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Qiuxu Zhuo The Root Complex Event Collectors (RCEC) appear as peers to Root Ports and also have the AER capability. So add RCEC support to the current AER error injection driver. Signed-off-by: Qiuxu Zhuo Co-developed-by: Sean V Kelley Signed-off-by: Sean V Kelley --- drivers/pci/pcie/aer_inject.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/pci/pcie/aer_inject.c b/drivers/pci/pcie/aer_inject.c index c2cbf425afc5..011a6c54b4e3 100644 --- a/drivers/pci/pcie/aer_inject.c +++ b/drivers/pci/pcie/aer_inject.c @@ -333,8 +333,11 @@ static int aer_inject(struct aer_error_inj *einj) if (!dev) return -ENODEV; rpdev = pcie_find_root_port(dev); + /* If Root port not found, try to find an RCEC */ + if (!rpdev) + rpdev = dev->rcec; if (!rpdev) { - pci_err(dev, "Root port not found\n"); + pci_err(dev, "Neither root port nor RCEC found\n"); ret = -ENODEV; goto out_put; } -- 2.28.0