Skip to content

Commit 0135255

Browse files
ij-intelbjorn-helgaas
authored andcommitted
PCI: Don't expose pcie_read_tlp_log() outside PCI subsystem
pcie_read_tlp_log() was exposed by the commit 0a5a46a ("PCI/AER: Generalize TLP Header Log reading") with the intent that drivers could use it, but the PCI maintainer later decided that drivers should be encouraged to use PCI core diagnostic logging of generic AER registers rather than building their own. Drivers that currently implement their own diagnostic logging include ixgbe (ixgbe_io_error_detected()) and iwlwifi (iwl_trans_pcie_dump_regs()). Remove the unwanted EXPORT of pcie_read_tlp_log() and remove it from include/linux/aer.h. Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/all/20240322193011.GA701027@bhelgaas/ Signed-off-by: Ilpo Järvinen <[email protected]> [bhelgaas: commit log] Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Jonathan Cameron <[email protected]> Reviewed-by: Yazen Ghannam <[email protected]>
1 parent 40384c8 commit 0135255

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

drivers/pci/pci.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1125,7 +1125,6 @@ int pcie_read_tlp_log(struct pci_dev *dev, int where,
11251125

11261126
return 0;
11271127
}
1128-
EXPORT_SYMBOL_GPL(pcie_read_tlp_log);
11291128

11301129
/**
11311130
* pci_restore_bars - restore a device's BAR values (e.g. after wake-up)

drivers/pci/pci.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
#include <linux/pci.h>
66

7+
struct pcie_tlp_log;
8+
79
/* Number of possible devfns: 0.0 to 1f.7 inclusive */
810
#define MAX_NR_DEVFNS 256
911

@@ -549,6 +551,8 @@ int aer_get_device_error_info(struct pci_dev *dev, struct aer_err_info *info);
549551
void aer_print_error(struct pci_dev *dev, struct aer_err_info *info);
550552
#endif /* CONFIG_PCIEAER */
551553

554+
int pcie_read_tlp_log(struct pci_dev *dev, int where, struct pcie_tlp_log *log);
555+
552556
#ifdef CONFIG_PCIEPORTBUS
553557
/* Cached RCEC Endpoint Association */
554558
struct rcec_ea {

include/linux/aer.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ struct aer_capability_regs {
3737
u16 uncor_err_source;
3838
};
3939

40-
int pcie_read_tlp_log(struct pci_dev *dev, int where, struct pcie_tlp_log *log);
41-
4240
#if defined(CONFIG_PCIEAER)
4341
int pci_aer_clear_nonfatal_status(struct pci_dev *dev);
4442
int pcie_aer_is_native(struct pci_dev *dev);

0 commit comments

Comments
 (0)