From: Bjorn Helgaas <helgaas@kernel.org>
To: Jon Mason <jdmason@kudzu.us>
Cc: Serge Semin <fancer.lancer@gmail.com>,
Dave Jiang <dave.jiang@intel.com>,
Allen Hubbe <allenbh@gmail.com>, Jean Delvare <jdelvare@suse.com>,
Guenter Roeck <linux@roeck-us.net>,
ntb@lists.linux.dev, linux-hwmon@vger.kernel.org,
linux-kernel@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>
Subject: [PATCH] ntb: idt: drop redundant pci_enable_pcie_error_reporting()
Date: Tue, 7 Mar 2023 14:30:21 -0600 [thread overview]
Message-ID: <20230307203021.881866-1-helgaas@kernel.org> (raw)
From: Bjorn Helgaas <bhelgaas@google.com>
pci_enable_pcie_error_reporting() enables the device to send ERR_*
Messages. Since f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is
native"), the PCI core does this for all devices during enumeration, so the
driver doesn't need to do it itself.
Remove the redundant pci_enable_pcie_error_reporting() call from the
driver. Also remove the corresponding pci_disable_pcie_error_reporting()
from the driver .remove() path.
Note that this only controls ERR_* Messages from the device. An ERR_*
Message may cause the Root Port to generate an interrupt, depending on the
AER Root Error Command register managed by the AER service driver.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
drivers/ntb/hw/idt/ntb_hw_idt.c | 17 +++++------------
1 file changed, 5 insertions(+), 12 deletions(-)
diff --git a/drivers/ntb/hw/idt/ntb_hw_idt.c b/drivers/ntb/hw/idt/ntb_hw_idt.c
index 0ed6f809ff2e..7192ff59dd91 100644
--- a/drivers/ntb/hw/idt/ntb_hw_idt.c
+++ b/drivers/ntb/hw/idt/ntb_hw_idt.c
@@ -2651,20 +2651,18 @@ static int idt_init_pci(struct idt_ntb_dev *ndev)
}
/*
- * Enable the device advanced error reporting. It's not critical to
+ * The PCI core enables device error reporting. It's not critical to
* have AER disabled in the kernel.
+ *
+ * Cleanup nonfatal error status before getting to init.
*/
- ret = pci_enable_pcie_error_reporting(pdev);
- if (ret != 0)
- dev_warn(&pdev->dev, "PCIe AER capability disabled\n");
- else /* Cleanup nonfatal error status before getting to init */
- pci_aer_clear_nonfatal_status(pdev);
+ pci_aer_clear_nonfatal_status(pdev);
/* First enable the PCI device */
ret = pcim_enable_device(pdev);
if (ret != 0) {
dev_err(&pdev->dev, "Failed to enable PCIe device\n");
- goto err_disable_aer;
+ return ret;
}
/*
@@ -2692,8 +2690,6 @@ static int idt_init_pci(struct idt_ntb_dev *ndev)
err_clear_master:
pci_clear_master(pdev);
-err_disable_aer:
- (void)pci_disable_pcie_error_reporting(pdev);
return ret;
}
@@ -2714,9 +2710,6 @@ static void idt_deinit_pci(struct idt_ntb_dev *ndev)
/* Clear the bus master disabling the Request TLPs translation */
pci_clear_master(pdev);
- /* Disable the AER capability */
- (void)pci_disable_pcie_error_reporting(pdev);
-
dev_dbg(&pdev->dev, "NT-function PCIe interface cleared");
}
--
2.25.1
next reply other threads:[~2023-03-07 20:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-07 20:30 Bjorn Helgaas [this message]
2023-03-09 12:01 ` [PATCH] ntb: idt: drop redundant pci_enable_pcie_error_reporting() Serge Semin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230307203021.881866-1-helgaas@kernel.org \
--to=helgaas@kernel.org \
--cc=allenbh@gmail.com \
--cc=bhelgaas@google.com \
--cc=dave.jiang@intel.com \
--cc=fancer.lancer@gmail.com \
--cc=jdelvare@suse.com \
--cc=jdmason@kudzu.us \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=ntb@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox