mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-03 23:37:40 -04:00
PCI/AER: Export pci_aer_unmask_internal_errors()
Internal PCIe errors are not enabled by default during initialization because their behavior is too device-specific and there is no standard way to reason about them. However, for CXL an internal error is the standard mechanism for conveying CXL protocol errors. Export pci_aer_unmask_internal_errors() for CXL, but make it clear that they are only meant for CXL and the status quo for leaving them masked for PCIe in general remains. Signed-off-by: Terry Bowman <terry.bowman@amd.com> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com> Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com> Link: https://patch.msgid.link/20260114182055.46029-10-terry.bowman@amd.com Co-developed-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Dave Jiang <dave.jiang@intel.com>
This commit is contained in:
@@ -1120,8 +1120,6 @@ static bool find_source_device(struct pci_dev *parent,
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PCIEAER_CXL
|
||||
|
||||
/**
|
||||
* pci_aer_unmask_internal_errors - unmask internal errors
|
||||
* @dev: pointer to the pci_dev data structure
|
||||
@@ -1132,7 +1130,7 @@ static bool find_source_device(struct pci_dev *parent,
|
||||
* Note: AER must be enabled and supported by the device which must be
|
||||
* checked in advance, e.g. with pcie_aer_is_native().
|
||||
*/
|
||||
static void pci_aer_unmask_internal_errors(struct pci_dev *dev)
|
||||
void pci_aer_unmask_internal_errors(struct pci_dev *dev)
|
||||
{
|
||||
int aer = dev->aer_cap;
|
||||
u32 mask;
|
||||
@@ -1146,6 +1144,13 @@ static void pci_aer_unmask_internal_errors(struct pci_dev *dev)
|
||||
pci_write_config_dword(dev, aer + PCI_ERR_COR_MASK, mask);
|
||||
}
|
||||
|
||||
/*
|
||||
* Internal errors are too device-specific to enable generally, however for CXL
|
||||
* their behavior is standardized for conveying CXL protocol errors.
|
||||
*/
|
||||
EXPORT_SYMBOL_FOR_MODULES(pci_aer_unmask_internal_errors, "cxl_core");
|
||||
|
||||
#ifdef CONFIG_PCIEAER_CXL
|
||||
static bool is_cxl_mem_dev(struct pci_dev *dev)
|
||||
{
|
||||
/*
|
||||
|
||||
@@ -56,12 +56,14 @@ struct aer_capability_regs {
|
||||
#if defined(CONFIG_PCIEAER)
|
||||
int pci_aer_clear_nonfatal_status(struct pci_dev *dev);
|
||||
int pcie_aer_is_native(struct pci_dev *dev);
|
||||
void pci_aer_unmask_internal_errors(struct pci_dev *dev);
|
||||
#else
|
||||
static inline int pci_aer_clear_nonfatal_status(struct pci_dev *dev)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
static inline int pcie_aer_is_native(struct pci_dev *dev) { return 0; }
|
||||
static inline void pci_aer_unmask_internal_errors(struct pci_dev *dev) { }
|
||||
#endif
|
||||
|
||||
void pci_print_aer(struct pci_dev *dev, int aer_severity,
|
||||
|
||||
Reference in New Issue
Block a user