diff --git a/Makefile b/Makefile index 128483f4..ca4b1aea 100644 --- a/Makefile +++ b/Makefile @@ -47,9 +47,6 @@ subdir-ccflags-y += -DNV_V4L2_ASYNC_MATCH_FWNODE_RENAME # Rename async_nf_init and v4l2_async_subdev_nf_register subdir-ccflags-y += -DNV_V4L2_ASYNC_NF_SUBDEVICE_INIT_RENAME -# Deprecate PCIED Error reporting pci_enable_pcie_error_reporting -subdir-ccflags-y += -DNV_DROP_PCIE_ERROR_REPORTING - # PCIE EPF driver probe has additional argument as ID subdir-ccflags-y += -DNV_PCIE_EFP_DRIVER_PROBE_HAS_ID_ARG diff --git a/drivers/misc/nvscic2c-pcie/epc/module.c b/drivers/misc/nvscic2c-pcie/epc/module.c index cd6ffb64..78c7b164 100644 --- a/drivers/misc/nvscic2c-pcie/epc/module.c +++ b/drivers/misc/nvscic2c-pcie/epc/module.c @@ -354,7 +354,7 @@ nvscic2c_pcie_epc_probe(struct pci_dev *pdev, ret = pcim_enable_device(pdev); if (ret) goto err_enable_device; -#if !defined(NV_DROP_PCIE_ERROR_REPORTING) +#if defined(NV_PCI_ENABLE_PCIE_ERROR_REPORTING_PRESENT) /* Linux 6.5 */ pci_enable_pcie_error_reporting(pdev); #endif pci_set_master(pdev); diff --git a/drivers/misc/tegra-pcie-dma-test.c b/drivers/misc/tegra-pcie-dma-test.c index b6d693bc..7dea5be0 100644 --- a/drivers/misc/tegra-pcie-dma-test.c +++ b/drivers/misc/tegra-pcie-dma-test.c @@ -5,6 +5,8 @@ * Copyright (C) 2021-2023 NVIDIA Corporation. All rights reserved. */ +#include + #include #include #include @@ -170,7 +172,7 @@ static int ep_test_dma_probe(struct pci_dev *pdev, return ret; } -#if !defined(NV_DROP_PCIE_ERROR_REPORTING) +#if defined(NV_PCI_ENABLE_PCIE_ERROR_REPORTING_PRESENT) /* Linux 6.5 */ pci_enable_pcie_error_reporting(pdev); #endif diff --git a/drivers/net/ethernet/nvidia/pcie/tegra_vnet.c b/drivers/net/ethernet/nvidia/pcie/tegra_vnet.c index 6b5d9b53..05fc4e5d 100644 --- a/drivers/net/ethernet/nvidia/pcie/tegra_vnet.c +++ b/drivers/net/ethernet/nvidia/pcie/tegra_vnet.c @@ -749,7 +749,7 @@ static int tvnet_host_probe(struct pci_dev *pdev, goto free_netdev; } -#if !defined(NV_DROP_PCIE_ERROR_REPORTING) +#if defined(NV_PCI_ENABLE_PCIE_ERROR_REPORTING_PRESENT) /* Linux 6.5 */ pci_enable_pcie_error_reporting(pdev); #endif diff --git a/scripts/conftest/Makefile b/scripts/conftest/Makefile index 9098bc52..3410a7fa 100644 --- a/scripts/conftest/Makefile +++ b/scripts/conftest/Makefile @@ -124,6 +124,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += netif_set_tso_max_size NV_CONFTEST_FUNCTION_COMPILE_TESTS += netif_napi_add_weight NV_CONFTEST_FUNCTION_COMPILE_TESTS += pde_data NV_CONFTEST_FUNCTION_COMPILE_TESTS += pci_disable_pcie_error_reporting +NV_CONFTEST_FUNCTION_COMPILE_TESTS += pci_enable_pcie_error_reporting NV_CONFTEST_FUNCTION_COMPILE_TESTS += register_shrinker_has_fmt_arg NV_CONFTEST_FUNCTION_COMPILE_TESTS += snd_soc_card_jack_new_has_no_snd_soc_jack_pins NV_CONFTEST_FUNCTION_COMPILE_TESTS += snd_soc_component_driver_struct_has_non_legacy_dai_naming diff --git a/scripts/conftest/conftest.sh b/scripts/conftest/conftest.sh index 8b3fd85f..ed529b05 100755 --- a/scripts/conftest/conftest.sh +++ b/scripts/conftest/conftest.sh @@ -6985,6 +6985,23 @@ compile_test() { compile_check_conftest "$CODE" "NV_PCI_DISABLE_PCIE_ERROR_REPORTING_PRESENT" "" "functions" ;; + pci_enable_pcie_error_reporting) + # + # Determine if the pci_enable_pcie_error_reporting() API available. + # + # API pci_enable_pcie_error_reporting() is dropped from Linux 6.5 + # with commit 7ec4b34be42345 ("PCI/AER: Unexport + # pci_disable_pcie_error_reporting()") + # + CODE=" + #include + void conftest_pci_enable_pcie_error_reporting(void) { + pci_enable_pcie_error_reporting(); + }" + + compile_check_conftest "$CODE" "NV_PCI_ENABLE_PCIE_ERROR_REPORTING_PRESENT" "" "functions" + ;; + register_shrinker_has_fmt_arg) # # Determine if the 'register_shrinker' function