From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out30-124.freemail.mail.aliyun.com (out30-124.freemail.mail.aliyun.com [115.124.30.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4BDAF30C349; Wed, 15 Oct 2025 02:42:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760496132; cv=none; b=L/TOnpcl5qVAciUw49GZqLurCo9ip9CngHuhhQUwPLyiwr/WSP1bRpqjizs4B9y6oxcvSD446y43L9Q8VizfU/NKpXBICUX+p3ddQez+5y4JXc5wIsIgZ0CImmDcXIdc+9bD/LAO+kRsmQ8FUyqsVlRbcSXIm/0a6nSGGyMUQXk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760496132; c=relaxed/simple; bh=eouj9LH5rcZ4+vjxu/jnWgda4kXju3BBQYozjDFdcAI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=oFxrWc8wy5csEVEJSVJLJhg8z9WW3z1ehSrgF78x+gY2igihyQA/ncyPcGhcJ+bP1hnmdFc1gm+uL/j34aYdT+3a+NgBbng51+L5YGjcFCeSkV7ph2mGUpDaxWlPL3qtpvrWJoW2wfTlPmme4DjDCGj4odZtVfaq+Hrh8BsDV/E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=Am3GK+Rl; arc=none smtp.client-ip=115.124.30.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="Am3GK+Rl" DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1760496126; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=puzbyrksJ6Ibr4OiaAvXhPRXIfrNu8KphJ6x82nMuQc=; b=Am3GK+RlZte9BkAu/3kog1vhBg4Q/I2hqJeyBfsJNSK/FsgC3iPJVMH98wnTOe/Qv+/ZeD0IF6Oc8RUXUTZcGSbSIIm51IDr9uC1z43lOiKBQJI89KBXgMElZKxQRMz2u7ZOTIyzGb9fUyf+g+awH0i2CbTBCTBIugP/pzMXHhk= Received: from localhost.localdomain(mailfrom:xueshuai@linux.alibaba.com fp:SMTPD_---0WqEYD7h_1760496124 cluster:ay36) by smtp.aliyun-inc.com; Wed, 15 Oct 2025 10:42:04 +0800 From: Shuai Xue To: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, bhelgaas@google.com, kbusch@kernel.org, sathyanarayanan.kuppuswamy@linux.intel.com Cc: mahesh@linux.ibm.com, oohall@gmail.com, xueshuai@linux.alibaba.com, Jonathan.Cameron@huawei.com, terry.bowman@amd.com, tianruidong@linux.alibaba.com, lukas@wunner.de Subject: [PATCH v6 4/5] PCI/ERR: Use pcie_aer_is_native() to check for native AER control Date: Wed, 15 Oct 2025 10:41:58 +0800 Message-Id: <20251015024159.56414-5-xueshuai@linux.alibaba.com> X-Mailer: git-send-email 2.39.5 (Apple Git-154) In-Reply-To: <20251015024159.56414-1-xueshuai@linux.alibaba.com> References: <20251015024159.56414-1-xueshuai@linux.alibaba.com> Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Replace the manual checks for native AER control with the pcie_aer_is_native() helper, which provides a more robust way to determine if we have native control of AER. No functional changes intended. Signed-off-by: Shuai Xue --- drivers/pci/pcie/err.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/pci/pcie/err.c b/drivers/pci/pcie/err.c index 4e65eac809d1..097990094b71 100644 --- a/drivers/pci/pcie/err.c +++ b/drivers/pci/pcie/err.c @@ -214,7 +214,6 @@ pci_ers_result_t pcie_do_recovery(struct pci_dev *dev, int type = pci_pcie_type(dev); struct pci_dev *bridge; pci_ers_result_t status = PCI_ERS_RESULT_CAN_RECOVER; - struct pci_host_bridge *host = pci_find_host_bridge(dev->bus); struct aer_err_info info; /* @@ -289,7 +288,7 @@ pci_ers_result_t pcie_do_recovery(struct pci_dev *dev, * it is responsible for clearing this status. In that case, the * signaling device may not even be visible to the OS. */ - if (host->native_aer || pcie_ports_native) { + if (pcie_aer_is_native(dev)) { pcie_clear_device_status(dev); pci_aer_clear_nonfatal_status(dev); } -- 2.39.3