mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
PCI: EPF: dma-test: Fix build for Linux v6.10
In Linux v6.10, the 'core_init_notifier' flag has been removed and dw_pcie_ep_init_notify() is now called by the designware endpoint driver so it is not necessary to call from the EPF DMA test driver. Add a test to the conftest script to detect the presence of the 'core_init_notifier' flag and update the EPF DMA test driver as necessary. Bug 4593750 Change-Id: I1c3862df2c673fcb2d7c19ebbf5e7d1cbdefea1f Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3152309 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
27bc2f4757
commit
d449f6cfd6
@@ -454,17 +454,18 @@ static int pcie_dma_epf_bind(struct pci_epf *epf)
|
||||
goto fail_get_features;
|
||||
}
|
||||
|
||||
#if defined(NV_PCI_EPC_FEATURES_STRUCT_HAS_CORE_INIT_NOTIFIER)
|
||||
if (!epc_features->core_init_notifier) {
|
||||
ret = pcie_dma_epf_core_init(epf);
|
||||
if (ret) {
|
||||
dev_err(fdev, "EPF core init failed with err: %d\n", ret);
|
||||
goto fail_core_init;
|
||||
goto fail_get_features;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
||||
fail_core_init:
|
||||
fail_get_features:
|
||||
debugfs_remove_recursive(epfnv->debugfs);
|
||||
if (epfnv->chip_id == TEGRA264)
|
||||
|
||||
@@ -153,6 +153,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += pwm_ops_struct_has_owner
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += pwm_ops_struct_has_config
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += pci_epc_event_ops_struct_has_core_deinit
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += pci_epc_features_struct_has_bar
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += pci_epc_features_struct_has_core_init_notifier
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += pci_epc_write_header_has_vfn_arg
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += pci_disable_pcie_error_reporting
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += pci_enable_pcie_error_reporting
|
||||
|
||||
@@ -7517,6 +7517,23 @@ compile_test() {
|
||||
compile_check_conftest "$CODE" "NV_PCI_EPC_FEATURES_STRUCT_HAS_BAR" "" "types"
|
||||
;;
|
||||
|
||||
pci_epc_features_struct_has_core_init_notifier)
|
||||
#
|
||||
# Determine if the pci_epc_features struct has a member 'core_init_notifier'.
|
||||
#
|
||||
# Commit a01e7214bef9 ("PCI: endpoint: Remove "core_init_notifier" flag")
|
||||
# removed the flag 'core_init_notifier' from the pci_epc_features structure
|
||||
# in Linux v6.10.
|
||||
#
|
||||
CODE="
|
||||
#include <linux/pci-epc.h>
|
||||
int conftest_pci_epc_features_struct_has_core_init_notifier(void) {
|
||||
return offsetof(struct pci_epc_features, core_init_notifier);
|
||||
}"
|
||||
|
||||
compile_check_conftest "$CODE" "NV_PCI_EPC_FEATURES_STRUCT_HAS_CORE_INIT_NOTIFIER" "" "types"
|
||||
;;
|
||||
|
||||
pci_epc_write_header_has_vfn_arg)
|
||||
#
|
||||
# Determine if the pci_epc_write_header() has the vfn argument or not.
|
||||
|
||||
Reference in New Issue
Block a user