Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp841680pxu; Thu, 15 Oct 2020 19:03:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjZN6cW/cPiwBbrj+BXGTpEpCGrH6pE2BPK0E7Uzae7W7YgVjqKcniXRnG68VoHqwF7AAU X-Received: by 2002:aa7:c054:: with SMTP id k20mr1418034edo.224.1602813809340; Thu, 15 Oct 2020 19:03:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602813809; cv=none; d=google.com; s=arc-20160816; b=dZ9a2M+Pc+zrNeViZULMHVCizuwmG5GtTHmgfDif/fj8ivYpSjYaAhEegIQAh9nZyK Ki2JIMAJnic7lEDH27tmq6nS2NBrsGGkf3z/wzT4PQhtD5RbZQG8SmqEYaZSZ8HJCFp4 /UvOg9c8CAx8bVZAWm09SJ0J9A12eMeXRD6cfl7i8d6n3DPzkH2f/bZxN3lR7zOdDIwZ Bmym0yqiVJ957kc5CS1aM5XnPkaWHRx+WEMUsY2gHF3qDC5rnvWBXCJf1PxdPaM8/kW+ vV7lYePnogsp6KnCbiDq790w3DAbd3bOFY4SZmmY8+esbLuzvYbXFXtd08SVls9hrtxB gQIw== 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=nyBbTyXDf3mqxE2/pZf0BxJ4TGB40IXyTT523AFOsZI=; b=X/hpGAqGO1annb27lRvuj5O5CBN4rboRH3A9O/bJwVvRRy8dKDqUt5QJ2IM/vfgy+s lP+RyoLa6S98NG4POgVBR5yKojYi/yVd7RQnChXvJVL3+Gv6A4FMZsndkwpwCGUaRA4b UGaR8jd1vaNXLUYbtxwhN/wdq713XFgAOZOP05T4S3Tg4GkIn2dg4o09aDNZILufvrce 2WhYCTPlVkEMIOitFnxvrKdNMQCIpima4EANCDQ5RH6IO8jLkcS4/jVctS/6t6jBLMV4 3BohTowcuGm0zM0fwexEwKTpn2AkZ+cC9MI1ygqsJdJGJdlDmawKeyjyUGBljFkGgLj/ jDxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oregontracks.org header.s=fm1 header.b=J1D6kGgz; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=JxDvwG8C; 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 w5si620533edj.536.2020.10.15.19.03.06; Thu, 15 Oct 2020 19:03:29 -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=J1D6kGgz; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=JxDvwG8C; 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 S2389857AbgJPAMq (ORCPT + 99 others); Thu, 15 Oct 2020 20:12:46 -0400 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:42513 "EHLO wout4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389795AbgJPAMk (ORCPT ); Thu, 15 Oct 2020 20:12:40 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id A159AC0D; Thu, 15 Oct 2020 20:12:37 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 15 Oct 2020 20:12:38 -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=nyBbTyXDf3mqxE2/pZf0BxJ4TGB40IXyTT523AFOsZI=; b=J1D6k GgzWexZu/3n7Jql4gEoh3wTR+SZE1IgYJ6nTyOBCyZbbtaSjQhvdtoTsTKiok7q0 Swivwxy4O0C7rNU2zed+2d7CQiRF1B9GZvuC5A6r5ss2yX2FO7rL1lQsCJ4vhj4W 4MeJMF6XYP9rL3XZtnbH5qD6GMapuxBhCFyHo+c4rX/mdFpn0xeTMMdoY2xvqFyk 1MCQ1YloALFoRskO2cFlnjFwvKZJ6IoWBQKhPN25kO47DlA/h/kKrgTKRc+2T05J eNFsJAV4uSdph9s3WJc2HH2WsyM2YnVuNuHKbyPS75Z+wb7KRIo4/j15zXh4n58b qt+xMbpj8eJSsHWPA== 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= fm1; bh=nyBbTyXDf3mqxE2/pZf0BxJ4TGB40IXyTT523AFOsZI=; b=JxDvwG8C YixRWruYLieByU9vsRo+wbXxvWQnFqsESJyChRUpC+qgxA7bkF3di1rJ/ATy9RLq kkKBf9BARn2mm6FyY7GdAQXTJWXQwZ0ghCT6UqC0ENx+5iU8kFCguKI85DqXsAjC Yl5EuO9PF2LD0wXP+g0MLiY4OxZssDjciQ2bc78IinTbgSiGfNEmOahTx0xLIIc2 Kkcw/LmyGt39MhqzcvBS9RHWSQ+belJlq8LFIlG1f3gXii8emLbjoGCLxL5GtkiP GTGc/OoVHiOYNwjBPyfUtc0w50/MAB983HO3krqt64GtnU3kkhLLEOIvNrROgVWj 0hZYcM6X47f6ew== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrieeggdeffecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpefuvggrnhcuggcumfgvlhhlvgihuceoshgvrghnvhhkrdguvghv sehorhgvghhonhhtrhgrtghkshdrohhrgheqnecuggftrfgrthhtvghrnhepkefggeektd dttdeuffffjeeihfetfffghfdugefhvdeuheeuudelheegleevheefnecuffhomhgrihhn pehkvghrnhgvlhdrohhrghenucfkphepvdegrddvtddrudegkedrgeelnecuvehluhhsth gvrhfuihiivgepuddunecurfgrrhgrmhepmhgrihhlfhhrohhmpehsvggrnhhvkhdruggv vhesohhrvghgohhnthhrrggtkhhsrdhorhhg 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 E94FA3064680; Thu, 15 Oct 2020 20:12:35 -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 v9 15/15] PCI/AER: Add RCEC AER error injection support Date: Thu, 15 Oct 2020 17:11:13 -0700 Message-Id: <20201016001113.2301761-16-seanvk.dev@oregontracks.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201016001113.2301761-1-seanvk.dev@oregontracks.org> References: <20201016001113.2301761-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 Root Complex Event Collectors (RCEC) appear as peers to Root Ports and may also have the AER capability. Add RCEC support to the AER error injection driver. Co-developed-by: Sean V Kelley Link: https://lore.kernel.org/r/20201002184735.1229220-15-seanvk.dev@oregontracks.org Signed-off-by: Qiuxu Zhuo Signed-off-by: Sean V Kelley Signed-off-by: Bjorn Helgaas --- 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..767f8859b99b 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