Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4259809pxk; Tue, 22 Sep 2020 14:49:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmrhAVlp5q3HHHHIEMzucxMydG6bujmUbQkBGk7nIoDCr13mPzRFON1vmvz5Yv+lqSIOs5 X-Received: by 2002:aa7:cf0e:: with SMTP id a14mr6255381edy.81.1600811387948; Tue, 22 Sep 2020 14:49:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600811387; cv=none; d=google.com; s=arc-20160816; b=w4+Dxlf7hTilRtObBM/agEmNWG9qKBUYZooSVD7bqhNe6OuJ6KaYFCgLIJHW1+EWrj shuE5gUW5nwYh/Qtp5dJbbs0cvnfNy3Xe2Wg7EltEsr9QcgmKkvCLEKpLd3qegAMKES6 9BuPGIxi3DnVv0rZFtOQrKuSDmB9h+DRwqnYeStCc0vLt3NwrRwyBUI04YHlZyqt2kXM il2UX43+A9mr3FLDNzcdRUOybrq/Uw31ljIBDNQ8RDBm6saGMJysG/JXT3thlrIlJzdk CDj8we0dhFhevtzgGzuAmXZwXFj02bOc/27Th3kqYJNG6qxbjNp24w9qzZF45XhAkkSi XYFA== 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=ERnpPU+gIC6hydkrdvGearFQ2eli18omiMWIHaoJwrQ=; b=gZUg+CRqxFfR284mKfdRg/UdabzQJy4lnLH9yWOckOxgOPIV56FHXX06BU4LxqqJRn 0q41O9i+uNjxDkgCsUrW7UHtRpTWDdA5SrUr5DvLUC2b4Bb0VD06G9Neja8/PkxN+1Ow t5F4bEy+XQfDCg5FyYP0Cb0hT03vmfaVonTsxbZHZC3TkJA6pi/e3sOtPla60i+fgMDE lmiXHymcHWK8XNz9IXks8OmuyVLsrlYGdkNETN/7OfviPofzQIiqQg9ivvYGuVAq/XTS ypfcrxFT0ENGoUD5lJp23uHjl552vL0dUhHgtXuNvzPM7UvTIj38hn6Sr2LQ2sCgWMxG meww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oregontracks.org header.s=fm1 header.b=cAmeSXXS; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=g2CQofjz; 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 qh9si11412082ejb.613.2020.09.22.14.49.24; Tue, 22 Sep 2020 14:49:47 -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=cAmeSXXS; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=g2CQofjz; 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 S1726775AbgIVVpu (ORCPT + 99 others); Tue, 22 Sep 2020 17:45:50 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:58151 "EHLO out5-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726643AbgIVVpt (ORCPT ); Tue, 22 Sep 2020 17:45:49 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 5F0C85C01C9; Tue, 22 Sep 2020 17:39:28 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Tue, 22 Sep 2020 17:39:28 -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=ERnpPU+gIC6hydkrdvGearFQ2eli18omiMWIHaoJwrQ=; b=cAmeS XXSEfcV5mIKhek96Y6PY8VtdNZ/EX0Q+CG+uFXrdakw/F2BPsdpBYetlvyhA2JfR TzPzfby4c0B0FdCPLRCD3F3NFW8lLCDoV5Vwk10lhV+wvGCAC188fkueisO3g3Zs OR6IoZ6r534X+f5kW5nWdt1COKmDJDPMwz0J9zVn0f53vYhIUjOcKxyKZGNReVjO 75Y/lvM4kIakcnTeX41o4SNLguTg5pJKQYwsZHT3MGNEX+UA0b5AWgdsnqpYa1lk CNbaFAGlcsljsthYFhrnDPVWMW/QsmpXxrAkw4EY7Sf6jPmkPiGJ2jbjUJWoWJbs aEADox0zWHULzLd2g== 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=ERnpPU+gIC6hydkrdvGearFQ2eli18omiMWIHaoJwrQ=; b=g2CQofjz G+aVr1kdoteVyLLL14QPVoUkMa9orx4qI5QlyPoSKdP4zMLF9SdKtshUYzYqrTP4 xUOD+pjAzN95HWWtWdPhT9C0E2a6dy05R6jy5QzBYPhUXRir83meGG8kSdY6SBzJ 7X5WOi4K84DB6RoVtJbRzutAs4IPZ6xxspkuUu/rBpay2t+N2y7q4zkaKhFnDbuf y60+M8rWpPFg3sU7j29R0T0bxtY+ylpZ+pA654B5CH/ZJf/OkiSUaEETTwbgBU0c yb7NWraAiT2vbYDbWvig57ZaST3FWDr7IhH1ohg2G24Y8Rfg3fqzyUFqR4u6PHui Gds+d7RnuGF9tg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudeggdduieefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomhepufgvrghnucggucfmvghllhgvhicuoehsvggrnhhvkhdruggv vhesohhrvghgohhnthhrrggtkhhsrdhorhhgqeenucggtffrrghtthgvrhhnpeehkeffte eiudeiffelkeelvefftdelhfeitdeigeffleeufedvgfegvdefvedtteenucfkphepvdeg rddvtddrudegkedrgeelnecuvehluhhsthgvrhfuihiivgepleenucfrrghrrghmpehmrg hilhhfrhhomhepshgvrghnvhhkrdguvghvsehorhgvghhonhhtrhgrtghkshdrohhrgh 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 BEC073064682; Tue, 22 Sep 2020 17:39:26 -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 v6 10/10] PCI/AER: Add RCEC AER error injection support Date: Tue, 22 Sep 2020 14:38:59 -0700 Message-Id: <20200922213859.108826-11-seanvk.dev@oregontracks.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200922213859.108826-1-seanvk.dev@oregontracks.org> References: <20200922213859.108826-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