From f51248fd49c23afa73ce2f1b279a093b29583db9 Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Tue, 5 Nov 2024 09:41:39 +0000 Subject: [PATCH] PCI: endpoint: Fix DMA sanity for Linux v6.11 The Tegra PCI endpoint DMA sanity driver build fails for Linux v6.11 because the 'core_init' callback was renamed to 'epc_init'. Update the driver accordingly to fix the build for Linux v6.11. Bug 4749580 Change-Id: I66a3c848f3f01b607d045c221bcc2ed21ac3df61 Signed-off-by: Jon Hunter Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3242701 GVS: buildbot_gerritrpt Reviewed-by: svcacv Reviewed-by: Srishti Goel --- .../pci/endpoint/functions/pci-epf-tegra-dma-sanity.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/pci/endpoint/functions/pci-epf-tegra-dma-sanity.c b/drivers/pci/endpoint/functions/pci-epf-tegra-dma-sanity.c index 2a065c88..a826c98b 100644 --- a/drivers/pci/endpoint/functions/pci-epf-tegra-dma-sanity.c +++ b/drivers/pci/endpoint/functions/pci-epf-tegra-dma-sanity.c @@ -1,7 +1,8 @@ // SPDX-License-Identifier: GPL-2.0-only -/* - * SPDX-FileCopyrightText: Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. - */ +// SPDX-FileCopyrightText: Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. + +#include + #include #include #include @@ -349,7 +350,11 @@ static const struct pci_epf_device_id pcie_dma_epf_sanity_ids[] = { }; static const struct pci_epc_event_ops pci_epf_dma_sanity_event_ops = { +#if defined(NV_PCI_EPC_EVENT_OPS_STRUCT_HAS_EPC_INIT) /* Linux v6.11 */ + .epc_init = pcie_epf_dma_sanity_core_init, +#else .core_init = pcie_epf_dma_sanity_core_init, +#endif }; static struct pci_epf_ops ops = {