Jason Mei
888f248ee2
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: svcacv <svcacv@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com >
Reviewed-by: Bibek Basu <bbasu@nvidia.com >
2024-03-14 08:54:11 -07:00
Jason Mei
396db89160
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
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com >
Reviewed-by: Bibek Basu <bbasu@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2024-03-03 20:54:20 -08:00
Jason Mei
3506076764
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
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com >
Reviewed-by: Bibek Basu <bbasu@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2024-02-25 21:39:59 -08:00
Jason Mei
5a65235c0d
PCI: EPF: Add lpci_epc_map_addr for pre-v5.15 Linux kernels
...
Build the Tegra PCI vnet driver fails with Linux v5.14 because the
lpci_epc_map_addr() have the incorrect number of arguments.
The arguments to the lpci_epc_map_addr() 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 4456727
Bug 4451567
Change-Id: Ie4ef36854d380e0a896a0f256d846ab8b89ca447
Signed-off-by: Jason Mei <jianjunm@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3070170
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com >
Reviewed-by: Bibek Basu <bbasu@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2024-02-25 21:39:54 -08:00
Jason Mei
e70b9e4c10
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
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com >
Reviewed-by: Bibek Basu <bbasu@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2024-02-25 21:39:48 -08:00
Jon Hunter
233a7eb320
drivers: Fix missing headers for Linux v6.8
...
For Linux v6.8, commit ef175b29a242 ("of: Stop circularly including
of_device.h and of_platform.h") updated the OF headers included by these
header files. This breaks the build for various drivers and so fix this
by including the headers that are actually needed for each driver.
Bug 4448428
Change-Id: Ia40ab13f865d5631c96855ecc49145848f99c996
Signed-off-by: Jon Hunter <jonathanh@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3032442
(cherry picked from commit ab65399274 )
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3063003
Reviewed-by: Brad Griffis <bgriffis@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2024-01-25 13:55:11 -08:00
Laxman Dewangan
09b54bda42
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
(cherry picked from commit 0ed8b4e22a )
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3032101
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
Tested-by: Jonathan Hunter <jonathanh@nvidia.com >
2023-12-12 03:39:59 -08:00
Laxman Dewangan
9c77439e40
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
(cherry picked from commit 64b442b57d )
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3032098
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
Tested-by: Jonathan Hunter <jonathanh@nvidia.com >
2023-12-12 03:39:45 -08:00
Nagarjuna Kristam
55e4803b61
PCI: tegra194: Ring doorbell If DMA is not running
...
Issue:
During multi threaded testing, there are cases where EDMA HW enters
stopped state even through there are pending descriptors to process.
This happens even when doorbell is rung after updating descriptors and
barriers places.
Fix:
After processing channel interrupt, ring doorbell, if there are pending
descriptors and for that channel is not running.
Bug 4111305
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2905177
Change-Id: I9d1bd391f690abc58cf262f62606c42504150b13
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2910921
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-05-30 07:40:00 -07: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
ffda313d72
PCI: tegra194: Fix edma desc size for remote EDMA
...
For Remote EDMA desc size is not updated and this results in
error during IRQ processing. Fix the same
Bug 4130564
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2909597
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com >
Change-Id: I5129f258a60139fe0f9e6c1226d0faf7c546f488
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2910912
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:08 -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
Nagarjuna Kristam
0221df9441
PCI: edma: Fix Coverity Issues
...
Perform ULL typecast during total size calculation for numerics.
Bug 3956683
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com >
Change-Id: Id9671dc37ff8747a6390063cc92a038e355990cc
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2881281
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svcacv <svcacv@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-04-04 21:54:45 -07:00
Manikanta Maddireddy
6afc085f93
PCI: Create a empty Makefile as a placeholder
...
Create a empty Makefile as a placeholder to copy priviate SoC PCIe driver.
Bug 4000789
Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com >
Change-Id: I38a900eacb8ada86b387e01bb4bfe7f40d08043b
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2870780
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-04 21:43:45 -07:00
Nagarjuna Kristam
ff5e03daaf
PCI: edma: Fix Coverity Issues
...
Perform U64 typecast when calculating total size of all nents.
Bug 3956683
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com >
Change-Id: I7b489213cb4c994190b58b09a149b08dfa3ebba5
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2876297
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-03-31 04:17:22 -07:00
Nagarjuna Kristam
a62b3e3686
pci: edma: Update SW ring before final PCS
...
Updated PCS to final descriptor after SW ring callback is updated.
Read back PCS and add mb to ensure write and read AI's of descriptor
are ordered before rining doorbell.
Bug 3747376
Bug 3960792
Change-Id: Ief7e6e91edb19571777c6f589da3e6262b4d24b3
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2778528
(cherry picked from commit df94316dc980657a66a2becbef94e21e52376a60)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2855011
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com >
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-02-10 23:45:32 -08:00
Nagarjuna Kristam
7e6a8f88f6
pcie: edma: Fix CERT issues
...
Fix CERT L2 issues.
Fixed CID's are 436308, 441509, 428257, 369367, 452877, 431183, 337589.
Bug 3798243
Bug 3877429
Change-Id: I672fb272e5c1ca3d3d67213412b18f58b5a6cef9
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2776714
(cherry picked from commit aad3f73328e78744fa56f68914074656a0915917)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2815930
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com >
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2022-11-29 04:17:32 -08: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
Jon Hunter
1733a8ddee
pci: tegra: Fix build for Linux v6.1
...
Upstream Linux kernel commit f2042ed21da7 ("iommu/dma: Make header
private") made the header "linux/dma-iommu.h" a private header file and
so compiling the Tegra PCI EDMA driver for Linux v6.1-rc1 now fails
because this header is not found. On further review, instead of
including "linux/dma-iommu.h" it is only necessary to include
"linux/dma-mapping.h" instead.
Bug 3831575
Change-Id: I3552eca64071bba98bb322377d7c211e3c22e7b6
Signed-off-by: Jon Hunter <jonathanh@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2793515
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com >
2022-10-18 11:24:47 -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
c18482299d
PCI: controller: Add VF driver support
...
Add tegra PCIe VF driver support from Nvidia repo
Bug 3583632
Change-Id: I323ae5a7aaa20647bfd80404bc354a5a52097cce
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2736248
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com >
GVS: Gerrit_Virtual_Submit
2022-07-05 14:32:15 -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
Nagarjuna Kristam
0d83600487
PCI: tegra194: Add PCIe EDMA and its RP drivers
...
Add PCI EDMA drivers from nvidia repo.
Bug 3583632
Change-Id: Id54bec8d70424d56d4b91f781568edbfa27c5a82
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2736242
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com >
GVS: Gerrit_Virtual_Submit
2022-07-05 14:32:02 -07:00