mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 10:11:26 +03:00
pcie: Enable core_deinit only when core has implemented it
The core_deinit callback is the Nvidia internal feature
which is not upstreamed yet. Enable the call back from
OOT modules only when core have implemented this callback.
Bug 4374520
Change-Id: Iee2b92b7d70326ea3ce99ce6f6600d27f1e2896b
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3014989
(cherry picked from commit dc69c0b58a)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3128429
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Brad Griffis <bgriffis@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
4e35e4b067
commit
cbac517483
@@ -168,6 +168,7 @@ static int pcie_dma_epf_core_init(struct pci_epf *epf)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if !defined(NV_PCIE_DMA_EPF_CORE_DEINIT_NOT_AVAILABLE)
|
||||
static int pcie_dma_epf_core_deinit(struct pci_epf *epf)
|
||||
{
|
||||
struct pcie_epf_dma *epfnv = epf_get_drvdata(epf);
|
||||
@@ -183,6 +184,7 @@ static int pcie_dma_epf_core_deinit(struct pci_epf *epf)
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void pcie_dma_epf_unbind(struct pci_epf *epf)
|
||||
{
|
||||
@@ -267,7 +269,9 @@ static const struct pci_epf_device_id pcie_dma_epf_ids[] = {
|
||||
|
||||
static const struct pci_epc_event_ops pci_epf_dma_test_event_ops = {
|
||||
.core_init = pcie_dma_epf_core_init,
|
||||
#if !defined(NV_PCIE_DMA_EPF_CORE_DEINIT_NOT_AVAILABLE)
|
||||
.core_deinit = pcie_dma_epf_core_deinit,
|
||||
#endif
|
||||
};
|
||||
|
||||
#if defined(NV_PCI_EPF_DRIVER_STRUCT_PROBE_HAS_ID_ARG) /* Linux 6.4 */
|
||||
|
||||
Reference in New Issue
Block a user