Manikanta Maddireddy
b0c580762b
PCI: Add T264 PCIe DMA support in PCIe EPF and client driver
...
Replace the exisiting T234 DMA APIs with common APIs and also add chip
specific changes like BAR.
Bug 4549851
Change-Id: I021e1e93a4fa4ff1d4429bd9db852e0e707ba879
Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3116906
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com >
Reviewed-by: Bibek Basu <bbasu@nvidia.com >
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
2024-05-04 16:43:14 -07:00
Jason Mei
df830d411d
PCI: EPF: tvnet: fixed the fence memory issue
...
1.Make the allocate_fence() thread-safe
2.Update the fence_do_work according to auto
fix: https://nvbugs/4539983
3.Shouldn't creat fence in callback
4.There was typo which mixed ctrl with data.
Bug 4456727
Bug 4451567
Change-Id: If7676c8d77dc40bd5f77927efa7616e7970da183
Signed-off-by: Jason Mei <jianjunm@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3087944
(cherry picked from commit 396db89160 )
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3096906
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-05-03 14:44:42 -07:00
Brad Griffis
f67a6565fb
pci: endpoint: use conftest for pci-epf-tegra-vnet.c
...
There are several build issues observed in pci-epf-tegra-vnet.c
when building against mainline.
These errors pertain to the following previous commits:
* Use conftest to find if pci_epc_event_ops struct has core_deinit.
* pci: Use conftest to find if probe of pci_epf_driver has ID arg
* misc: nvscic2c-pcie: Drop usage of enum pci_epc_irq_type from Linux 6.8
The pci-epf-tegra-vnet.c is recently added and needs to use those
same new conftest capabilities.
Bug 4346767
Change-Id: I4ea66524513cdc4d62607a061c3f253e2a3cee2b
Signed-off-by: Brad Griffis <bgriffis@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3128608
Reviewed-by: Jon Hunter <jonathanh@nvidia.com >
(cherry picked from commit b0e75c8874 )
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3130622
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-05-03 14:44:32 -07:00
Brad Griffis
cdbedbf31e
drivers: pci: Fix the argument of iommu_map() for Linux v6.3
...
There is additional argument added in iommu_map() from Linux v6.3.
Pass the proper argument from the driver who are using this
APIs. Using conftest methods for differentiating whether
additional argument is needed or not.
Bug 4374520
Change-Id: I3d6452cf6c71f495e3b6e3b240b2c2d839aa4b0d
Signed-off-by: Brad Griffis <bgriffis@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3128547
Reviewed-by: Jon Hunter <jonathanh@nvidia.com >
(cherry picked from commit 222eebeb31 )
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3130621
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-05-03 14:44:22 -07:00
Jason Mei
d99e65db74
PCI: EPF: tvnet: porting the PCIe tvnet driver
...
Port the PCIe tvnet to 5.15 kernel
Bug 4456727
Bug 4451567
Change-Id: I1b7a68479749145eca33361d6c79d53622c57ce7
Signed-off-by: Jason Mei <jianjunm@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3070167
(cherry picked from commit e70b9e4c10 )
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3084980
Reviewed-by: Brad Griffis <bgriffis@nvidia.com >
Tested-by: Brad Griffis <bgriffis@nvidia.com >
Reviewed-by: Jon Hunter <jonathanh@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2024-05-03 14:44:12 -07:00
Jason Mei
217da833a0
net: Use conftest to determime NAPI interface
...
Add compile time tests to the conftest.sh script
to determine netif_napi interface check at compile
time for the kernel being used. This is beneficial
for working with 3rd party Linux kernels that may
have back-ported upstream changes into the kernel
and so the kernel version checks do not work.
Bug 4456727
Bug 4451567
Change-Id: I7b00c3b491d778a9bf2f0d1069a5e4546b722e2a
Signed-off-by: Jason Mei <jianjunm@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3096002
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com >
Reviewed-by: Bibek Basu <bbasu@nvidia.com >
(cherry picked from commit 888f248ee2 )
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3096946
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-05-03 14:44:07 -07:00
Jason Mei
0510889913
PCI: EPF: tvnet: porting the PCIe EP tvnet driver
...
Port the PCIe EP tvnet to 5.15 kernel
switch to host1x sycpt method and others kernel
interfaces
Bug 4456727
Bug 4451567
Change-Id: I78a1ed5e1f80210a03dc83775937ba90c2839a5b
Signed-off-by: Jason Mei <jianjunm@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3070173
(cherry picked from commit 3506076764 )
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3084981
Tested-by: Brad Griffis <bgriffis@nvidia.com >
Reviewed-by: Jon Hunter <jonathanh@nvidia.com >
Reviewed-by: Brad Griffis <bgriffis@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2024-05-03 14:42:54 -07:00
Jon Hunter
971680aadb
PCI: Fix endpoint DMA test for Linux v6.9
...
Building the PCI EPF DMA test driver for Linux v6.9 is failing because
the parameters for the pci_epf_alloc_space() function has been updated
to pass the alignment value via the 'pci_epc_features' structure instead
of passing the value directly.
Instead of hard-coding the endpoint alignment in the EPF DMA test driver
use the 'pcie_epc_get_features()' function to retrieve the endpoint
features structure which has the endpoint alignment.
By using the conftest script to detect the parameters for the
pci_epf_alloc_space() function, we can then pass the appropriate
arguments to the pci_epf_alloc_space() function.
Bug 4471899
Change-Id: Id80259a4c90d6f6ae2132cccbec1a96113d22be7
Signed-off-by: Jon Hunter <jonathanh@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3116548
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-04-18 01:14:35 -07:00
Manikanta Maddireddy
fc47fbceba
PCI: Fix PCIe Endpoint device IDs
...
PCIe device ids 0x229a and 0x229c belongs to Root port, so this driver
is binding instead of pcieport. Tegra PCIe Endpoint production device ids
are 0x1ad4 and 0x1ad5, correct the device ids accordingly.
Bug 4477934
Change-Id: Ia86c4dcc6b4527e984a473c941713ef58dd6f74d
Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3067109
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com >
Reviewed-by: Bibek Basu <bbasu@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2024-02-02 04:21:13 -08:00
Laxman Dewangan
932f9757ab
misc: nvscic2c-pcie: Drop usage of enum pci_epc_irq_type from Linux 6.8
...
The enum pci_epc_irq_type is dropped from Linux 6.8 with
commit 74955cb8ccc385 ("PCI: endpoint: Drop PCI_EPC_IRQ_XXX definitions")
Use alternative definition from mainline.
Bug 4448428
Change-Id: Ic248ee2522f171c311ac1086c2792bcf3ad6ed64
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3062520
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2024-01-25 17:26:42 -08:00
Laxman Dewangan
0ed8b4e22a
pci: Use conftest to find if probe of pci_epf_driver has ID arg
...
Use conftest to determine if the struct pci_epf_driver probe
API has ID argument or not
The additional argument as ID is added in probe() of the
struct pci_epf_driver with commit 081c715dfd5054 ("PCI:
endpoint: Pass EPF device ID to the probe function")
in Linux 6.4.
Bug 4346767
Change-Id: I004d1d3a8df922c0534c5631baa26f82f6992e4d
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3030052
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-12-07 18:21:31 -08:00
Laxman Dewangan
1e9fc00bc2
pci: Use conftest to find if pci_epc_event_ops struct has core_deinit
...
Use the conftest to find if the struct pci_epc_event_ops has
core_deinit as callback function. This callback is added
by Nvidia in core kernel.
Bug 4346767
Change-Id: I399197917ac7746ca367f55b9dc4e3a5bd79f073
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028740
Reviewed-by: Shardar Mohammed <smohammed@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-12-07 18:20:56 -08:00
Laxman Dewangan
64b442b57d
pci-epf: probe has additional APIs for Linux 6.6
...
The probe callback of driver "pci_epf_driver" has additonal
APIs as pci_epf_device_id for Linux 6.6 and above.
Add this new argument for Linux 6.6 and above.
Bug 4374520
Change-Id: Ie744a98947b895fce83f1a9df598ddbee2c3d138
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3014991
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-11-13 06:44:46 -08:00
Laxman Dewangan
dc69c0b58a
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
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-11-13 06:44:36 -08:00
Nagarjuna Kristam
37956be9b4
PCI: EPF: dma-test: Remove dead code
...
pci-epf-dma-test is initially written with DMA programming part of
it. Now DMA driver is available separate and DMA programming part of
this driver conflicts with actual programming and results in unexpected
behaviour. Remove non DMA driver test interaction code.
Bug 4124875
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2907365
Change-Id: Id86ea10d64c13381d4931aa742ba530e0295d10f
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2910916
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-05-30 07:39:29 -07:00
Nagarjuna Kristam
6a981ab712
PCI: EPF: dma-test: Fix Coevrity issues
...
Fix coverity issue of dead code and unreachable code.
Bug 3952896
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com >
Change-Id: I6ca4b485f6b053ea6787b76f3fae95d8f6914c98
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2905249
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com >
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-05-18 23:46:12 -07:00
Manikanta Maddireddy
319fa69bd5
PCI: Add data integrity check for PCIe DMA
...
Add CRC check after PCIe DMA to verify data integrity.
Bug 3636902
Bug 3868928
Change-Id: If497ce769571c6c837acbfbbb64b2242dfabef26
Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2718787
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2720336
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2815927
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com >
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com >
Tested-by: Nagarjuna Kristam <nkristam@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2022-11-29 04:17:18 -08:00
Nagarjuna Kristam
e1f7bf59ed
PCI: EPF: dma-test: Use callback instead of notifier
...
EPF framework no longer supports notifers but supports callbacks instead.
Register callbacks for init and deinit.
Enable DMA test driver only if EP support is enabled.
Bug 3790460
Change-Id: Ic1e14cdc1a0bd80d49991b5f94713b705085825b
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2702389
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2022-11-15 11:19:59 -08:00
Jon Hunter
a600207e7d
pci: epf: Fix build for pre-v5.15 Linux kernels
...
Build the Tegra PCI EPF driver fails with Linux v5.14 because the
pci_epf_alloc/free_space() have the incorrect number of arguments.
The arguments to the pci_epf_alloc/free_space() functions were updated
in Linux v5.12 but the current Tegra PCI EPF driver assumes that they
were updating after Linux v5.14. Update the Tegra PCI EPF driver to
use the correct arguments for v5.12 onwards.
Bug 3820317
Change-Id: Ieba44bfc22e0f978a5ff227b6d07a6a56ad23f3b
Signed-off-by: Jon Hunter <jonathanh@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2791670
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com >
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2022-10-20 02:19:35 -07:00
Manikanta Maddireddy
2db1b1e964
PCI: EPF: Use latest MSI accessors and iterator functions
...
MSI accessors and iterator functions are updated in Linux 5.16 version.
Use these function to fix build error.
Bug 3604749
Change-Id: Ibda5372ee743d5e224d0eef898c4cfc665107367
Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2742830
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com >
Reviewed-by: Bibek Basu <bbasu@nvidia.com >
2022-07-13 16:40:29 -07:00
Nagarjuna Kristam
87f4a51862
pci: epf: Add dma test function driver
...
Add DMA test function driver from Nvidia repro
Bug 3583632
Change-Id: I603d16f74cba2b4752ab31af59b12e7c784f042e
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2736247
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com >
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com >
GVS: Gerrit_Virtual_Submit
2022-07-05 14:32:06 -07:00