Commit Graph

338 Commits

Author SHA1 Message Date
Sushil Kumar Singh
a986d91aa3 nvethernet: Kernel panic when set jumbo frame
Issue:
Macsec data is NULL for Xavier platforms as no DT macsec
entry is available. This NULL pointer is accessed when
changing MTU, causing kernel panic.

[  110.247070] Unable to handle kernel NULL pointer dereference at virtual address 000000000000015c
[  110.247292] Mem abort info:
[  110.247355]   ESR = 0x96000004
[  110.247423]   EC = 0x25: DABT (current EL), IL = 32 bits
[  110.247534]   SET = 0, FnV = 0
[  110.247616]   EA = 0, S1PTW = 0
[  110.247682] Data abort info:
[  110.247743]   ISV = 0, ISS = 0x00000004
[  110.247823]   CM = 0, WnR = 0
[  110.247889] user pgtable: 4k pages, 48-bit VAs, pgdp=000000010a201000
[  110.248031] [000000000000015c] pgd=0000000000000000, p4d=0000000000000000
[  110.248176] Internal error: Oops: 96000004 [#1] PREEMPT SMP
[  110.248295] Modules linked in:
[  110.248379] CPU: 2 PID: 1423 Comm: ifconfig Not tainted 5.10.120-tegra #11
[  110.248525] Hardware name: Unknown Jetson-AGX/Jetson-AGX, BIOS 0.0-ff9214ce 12/20/2022
[  110.248690] pstate: 60400009 (nZCv daif +PAN -UAO -TCO BTYPE=--)
[  110.249074] pc : ether_change_mtu+0x144/0x220
[  110.249381] lr : ether_change_mtu+0x140/0x220
[  110.250528] sp : ffff800014b1b470
[  110.253853] x29: ffff800014b1b470 x28: ffff0318c9632d00
[  110.259366] x27: ffffb376aafb0978 x26: ffffb376aafb0948
[  110.264636] x25: ffffb376ab3b3aa0 x24: ffffb376abf7edd8
[  110.269870] x23: ffff0318c9632d00 x22: ffffb376abeb97d8
[  110.275569] x21: ffff0318c5dc0940 x20: 0000000000002328
[  110.280806] x19: ffff0318c5dc0000 x18: 0000000000000010
[  110.286401] x17: 0000000000000000 x16: ffffb376aa327910
[  110.291581] x15: ffff0318c9633270 x14: ffffffffffffffff
[  110.297166] x13: ffff800094b1b167 x12: ffff800014b1b16f
[  110.302500] x11: 0000000000000020 x10: ffffb376abbb0aa0
[  110.307770] x9 : ffffb376a9ccba7c x8 : 0000000000000001
[  110.313439] x7 : 0000000000017fe8 x6 : c0000000ffffefff
[  110.318605] x5 : ffff031c3fd60958 x4 : 0000000000000000
[  110.324305] x3 : 0000000000000001 x2 : 0000000000000000
[  110.329369] x1 : 0000000000000000 x0 : 0000000000000000
[  110.334706] Call trace:
[  110.337416]  ether_change_mtu+0x144/0x220
[  110.341187]  dev_set_mtu_ext+0xe8/0x1d0
[  110.345121]  dev_set_mtu+0x44/0xb0
[  110.348616]  dev_ifsioc+0x254/0x4d0
[  110.352115]  dev_ioctl+0x128/0x380
[  110.355270]  sock_do_ioctl+0xd4/0x240
[  110.359027]  sock_ioctl+0x27c/0x510
[  110.362530]  __arm64_sys_ioctl+0xb8/0x100
[  110.366731]  el0_svc_common.constprop.0+0x80/0x1f0
[  110.371540]  do_el0_svc+0x2c/0x90
[  110.374522]  el0_svc+0x20/0x40
[  110.377943]  el0_sync_handler+0xc0/0xd0
[  110.381689]  el0_sync+0x184/0x1c0
[  110.384931] Code: b900e714 5281ef42 941a98a4 f94312a0 (b9415c00)
[  110.390801] ---[ end trace cbec9c44e214f14b ]---
[  110.395602] Kernel panic - not syncing: Oops: Fatal exception
[  110.400962] SMP: stopping secondary CPUs
[  110.404718] Kernel Offset: 0x337699bb0000 from 0xffff800010000000
[  110.410752] PHYS_OFFSET: 0xfffffce840000000
[  110.414945] CPU features: 0x18240002,03802a30
[  110.419490] Memory Limit: none
[  110.422645] ---[ end Kernel panic - not syncing: Oops: Fatal exception ]---

Fix:
Add NULL check for macsec data. Macsec is set to NULL if it is not
supported in DT from macsec probe.

Bug 3952134

Change-Id: I0b292e39f3ec8f8fed0fb3fef5cd9f52f5c0e2a9
Signed-off-by: Sushil Kumar Singh <sushilkumars@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2846676
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2878453
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-05 06:01:49 -07:00
Revanth Kumar Uppala
80336d6c96 nvethernet: Fix compilation warnings
1.There is a switch-case where one case is falling to the
next case. This is creating the compilation warning.
Make this fall through as intentional by adding
compiler attribute as "fallthrough".

2.Remove redefinition of macro MII_ADDR_C45

Bug 4055275

Change-Id: I99193b225e97c414588bb306cb48e472ae079f9f
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2882027
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-04 21:57:46 -07:00
Mohan Thadikamalla
01d8319aae nvethernet: Add Linux safety support
Issue:
Observed compilation issues
on the nvethernet driver
for DRIVE Linux safety builds.

Fix:
Add OSI_STRIPPED_LIB support
on nvethernet driver.

Bug 3939603

Change-Id: Id4213c1cf33dc0e925df3e627072b727ae44fa71
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2842470
(cherry picked from commit ece0eb57a89396ea8bdc412beeaa7dfabbda49b1)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2879701
Tested-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-04 21:49:37 -07:00
Mohan Thadikamalla
8bb99f5a5d nvethernet: Remove hsierrrptinj callback on probe
Don't register hsierrrptinj callbacks
on probe, only register from
sysfs inputs.

Bug 4050215

Change-Id: Ic8f8971552f5e96b8d10aa25603191206d3d317d
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2830534
(cherry picked from commit 1b053c26a00bab026285a8733b3abe1884494489)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2879714
Tested-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-03-31 10:11:55 -07:00
Nagarjuna Kristam
72fa62af01 NET: tvnet: Fix Coverity issues
Initialize ctrl_msg to 0 before passing to function.

Bug 3956683

Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Change-Id: I540d7d8bcc20003da5c5faea2d0d081da25527bd
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2876299
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-03-31 04:17:31 -07:00
Revanth Kumar Uppala
6e2e6973cd nvethernet: Avoid using mdiobus_c45_addr().
Avoid using mdiobus_c45_addr() as it is
obsolete from K6.3.
Instead use its definition directly.

Bug 4014315

Change-Id: Ic407f407b03e465eea97bb530e86360ef81eb1e6
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2873724
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-03-26 17:35:58 -07:00
Jon Hunter
b5ec750ebb marvell: oak: Fix build for Linux v5.14
The functions eth_hw_addr_set() and dev_addr_mod() do not exist for
Linux v5.14 and so compiling the marvell oak driver fails for Linux
v5.14. Fix this by calling memcpy() instead of eth_hw_addr_set() and
dev_addr_mod() for Linux v5.14. Note that both eth_hw_addr_set() and
dev_addr_mod() internally call memcpy() and so this is equivalent.

Bug 3820317

Change-Id: I4b49e031383adf62a55f1d01e8de2fcc0ad47862
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2875022
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-03-24 17:20:19 -07:00
Jon Hunter
fee7e399b9 drivers: Disable broken drivers for Linux v6.3
Several drivers fail to build with Linux v6.3 due to upstream changes in
the Linux kernel. Disable this drivers until a fix is in place.

Bug 4014315

Change-Id: Iddd2c1e552c92311a982ff91837cef6377a947d6
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2867129
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Rohit Khanna <rokhanna@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-03-22 03:25:09 -07:00
Revanth Kumar Uppala
1d36e57bf2 nvethernet: use address setting helpers
Use address setting helpers as netdev->dev_addr
is constant from K5.17

Bug 3978991

Change-Id: I75520ecf695cbf370ef8233d12c250996ebc2abd
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2872952
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-03-21 02:38:07 -07:00
Manish Bhardwaj
2884fc0a73 nvidia-oot: add support for recovery kernel
Stop compilation for marvel driver in nvidia-oot
repo, since PCI support in core kernel is missing
in recovery kernel.

Bug 3863448

Change-Id: Ic74ed237ebd15425b8d07e1187b0123769fd5855
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2871454
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
Tested-by: Sheetal Tigadoli <stigadoli@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-03-21 02:27:33 -07:00
Sheetal Tigadoli
be8bd94e28 ethernet:marvell:Fix compilation errors in K5.15
Fix compilation errors in K5.15
  1. signature of netif_napi_add has changed,
     use netif_napi_add_weight instead
  2. addr issues arising due to constifying
     *dev_addr varable defined in net_device struct

Jira ESDP-16549
Bug 3882239

Change-Id: Id644925d2e1cee71d7fc8f97e9c1982897a744ef
Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2858625
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-03-21 02:27:29 -07:00
praveen
4abc0b9d03 Marvell: oak: Nvidia changes on oak pci drv
List of changes squashed in this
* From previous commits
    - Marvell: oak: Assign random MAC address
    - Clear filters to support port mirroring

* New changes to be reviewed
	- Terminate pci_device_id table

Jira ESDP-14058
Bug 200702607
Bug 3604084

Change-Id: Ice076a0c8d897292b098ac841f5636b5251db40d
Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2856989
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-03-21 02:27:24 -07:00
Sheetal Tigadoli
748fa9c699 marvell:Add compilation support to driver
- Renamed the directory to oak
- Updated the make files to compile the source
- Removed unused script

ESDP-16549
Bug 3882239
Bug 3824037

Change-Id: I1dee5def85b6e25f88dff999f1051bfe62d5613b
Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2856988
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-03-21 02:27:20 -07:00
Sheetal Tigadoli
afd05b80bd ethernet:marvell:Add pci driver for spruce/oak
This patch adds latest Marvell ethernet PCI GPL driver
(v3.01.0000) for spruce/oak i.e for 88Q6113/88Q5072.

Jira ESDP-16549
Bug 3882239

Change-Id: I15c6fab1d21cd3fa24a3cee76bdce42b27778445
Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2856987
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
2023-03-21 02:27:15 -07:00
Rakesh Goyal
dd7632c195 nvethernet: fix syntax error in fpe ioctl
Issue: Due to syntax error, only 1 byte getting
copied from user space to kernel space.

Fix: Fix syntax error. Add error logs

Bug 3991771

Change-Id: Iff96d0f51605fab2954c1c9a423ad9a6781c1e21
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2866442
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-03-07 22:52:15 -08:00
Revanth Kumar Uppala
024d4d5e6f ptp: Linux v6.2: Add support for adjfine
In Linux v6.2 func pointer adjfreq is replaced
with adjfine. As a part of this, an argument of
the function "s32 ppb" is changed to
"long scaled_ppm".Added kernel version checks
to handle this for Linux v6.2

Bug 3936429

Change-Id: I7a4f0a0e6e17d484c4ffd47e6e9ef78c214253e7
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2862518
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-03-01 10:24:11 -08:00
Manish Bhardwaj
dee4d41861 nvidia-oot: add support for recovery kernel
Stop compilation for nvidia-oot drivers, whose
core kernel support is missing in recovery
kernel.

Bug 3863448

Change-Id: I36f09f74d4448af4b13eeebaaeadc53c3f83e002
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2856892
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-23 22:53:00 -08:00
Sushil Kumar Singh
5267694f8e nvethernet: Fix coverity defect
Issue:
Unused value in code with below CID's

10166525
10166540

Fix:
Removed unused variable assignment.

Bug 3952896

Change-Id: I8fa305b26470c08d0eec0e83c8fc5e4fe15be49d
Signed-off-by: Sushil Kumar Singh <sushilkumars@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2860934
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-22 00:45:49 -08:00
Vince Hsu
c41266d8b0 nvethernet: use -mno-outline-atomics for nvethernet
The -moutline-atomics is enabled by default since GCC 10. Specify
-mno-outline-atomics to avoid the error when building with GCC 11.

MODPOST kernel-nvidia-oot/nvidia-oot/Module.symvers
ERROR: modpost: "__aarch64_cas4_acq_rel" [ kernel-nvidia-oot/nvidia-oot/drivers/net/ethernet/nvidia/nvethernet/nvethernet.ko] undefined!
ERROR: modpost: "__aarch64_ldadd4_acq_rel" [ kernel-nvidia-oot/nvidia-oot/drivers/net/ethernet/nvidia/nvethernet/nvethernet.ko] undefined!

Bug 3975705
Bug 200730650

Change-Id: Ief3188dbad704c08deec34f2d23ccd9625fa0a5a
Signed-off-by: Vince Hsu <vinceh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2855788
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-15 15:56:25 -08:00
Sushil Kumar Singh
877d53d041 nvethernet: Error check for mac address DT node
Issue:
Incorrect return value check for of_get_mac_address()
when reading mac address from dt property.

Fix:
1. Modify error check condition based on
of_get_mac_address() return values.
2. Fixes the Coverity defect CID 10166538.

Bug 3952896

Change-Id: I65ddd05538ad3039da2a21a79be8bb7a0ed1f3fc
Signed-off-by: Sushil Kumar Singh <sushilkumars@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2857036
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-15 04:32:29 -08:00
Sushil Singh
9b97e33558 nvethernet: Fix cert c issues
Issue:
CERT EXP33-C - Using uninitialized value.

Fix:
Initialize variable before use

Bug 3959323

Change-Id: Ia4dc3f58ef13c76305ce8242d38a1863986af193
Signed-off-by: Sushil Singh <sushilkumars@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2853914
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-02-10 23:44:41 -08:00
Revanth Kumar Uppala
2172c01a6d ethernet: Get VM IRQ config sequence from nvidia,vm-irq-id
Ethernet driver expect the VM IRQ configuration. The VM IRQ
is provided with the property "interrupt" which have multiple
VM irq numbers and their configurations via the vm irq
configuration node which is referred by property
"nvidia,vm-irq-config".

The vm irq configuration node have the configuration of
all VM IRQ and each configuration is separated with the
child node like below.

ethernet@6800000 {
	nvidia,vm-irq-config = <&mgbe_vm_irq_config>;
}

	mgbe_vm_irq_config: mgbe-vm-irq-config {
		nvidia,num-vm-irqs = <5>;
		vm_irq1 {
			nvidia,num-vm-channels = <2>;
			nvidia,vm-channels = <0 1>;
			nvidia,vm-num = <0>;
                        nvidia,vm-irq-id = <0>;

		};
		vm_irq2 {
			nvidia,num-vm-channels = <2>;
			nvidia,vm-channels = <2 3>;
			nvidia,vm-num = <1>;
                        nvidia,vm-irq-id = <1>;
		};
		vm_irq3 {
			nvidia,num-vm-channels = <2>;
			nvidia,vm-channels = <4 5>;
			nvidia,vm-num = <2>;
                        nvidia,vm-irq-id = <2>;
		};
		vm_irq4 {
			nvidia,num-vm-channels = <2>;
			nvidia,vm-channels = <6 7>;
			nvidia,vm-num = <3>;
                        nvidia,vm-irq-id = <3>;
		};
		vm_irq5 {
			nvidia,num-vm-channels = <2>;
			nvidia,vm-channels = <8 9>;
			nvidia,vm-num = <4>;
                        nvidia,vm-irq-id = <4>;
		};
	};
};

The child 1(vm_irq1) is link with the VM IRQ  1 listed in
interrupt property, next child which is vm_irq2 is link
with the 2nd VM irq. So, the order of VM configuration
child must be in same order as VM IRQ provided in the
property interrupt.

If the irq configuration order i..e child order is not
matching with VM irq number then there is interrupt issue.

Now, if the VM IRQ config child nodes are provided in base
DT file in same order then the ethernet works fine.
But when applying via overlay, it does not work.
This is because of overlay technique. The overlay logic is
such that it iterates all child node in overlay and
apply the child as first child of target node.
Hence the child sequence provided in overlay fragment
is applied in reverse order in target node. This causes
the irq configuration order not matching with VM IRQs.

To address the overlay issue, read the sequence of
interrupt in property "interrupt" from the newly added property
"nvidia,vm-irq-id" of each child. This way child node
sequence does not matter, and sequence is identified
by property.

Bug 3956724

Change-Id: I5c08edcd8a7e8d3112618dd23050d8b5c10ddc59
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2855639
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-10 06:20:04 -08:00
Bharat Nihalani
354ef0dbe0 drivers: Use runtime debugfs check
When kernel command line debugfs=off is specified instead of
disabling CONFIG_DEBUG_FS in defconfig to disable Debug-FS,
debugfs functions like debugfs_create_dir will fail.

Use function debugfs_initialized() to check if debugfs
functionality is enabled before calling any debugfs functions.

This allows us to by-pass debugfs initialization if debugfs
is not enabled.

Bug 3752450

Change-Id: I17390c2d9928638d940454c2ea1b3abf00ed4264
Signed-off-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2855128
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-10 06:17:56 -08:00
Revanth Kumar Uppala
8ca99872cc nvethernet: Resolve "Wframe-larger-than" warning
Removing duplicate structure variables to eliminate
"Wframe-larger-than" warning.

Bug 3793131

Change-Id: I480b11293708fb97e1f86b862e275a62b6a0f854
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2837140
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-01-16 10:14:18 -08:00
Sheetal Tigadoli
c9df39dd07 nvethernet: register ptp MAC with notifier framework
register ptp MAC with notifier framework by default
since CONFIG_TEGRA_PTP_NOTIFIER has been removed and
is corresponding code is enabled as default. 

Bug 3895413
Bug 3930304 

Change-Id: Ib875079504bfcbfcaf286bb606b4fd581fc12754
Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2837510
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-01-06 22:36:53 -08:00
Revanth Kumar Uppala
cb04b4d509 nvethernet: Register ioctl callback functions
Add ioctl callback functions compatible with
kernel versions below 5.15

Bug 3895413

Change-Id: I4ab5d0b6137c6dce7749cb003d99603cff8cb201
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2833701
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-01-04 17:56:22 -08:00
Revanth Kumar Uppala
843ab03d91 nvethernet: Register ioctl callback functions
Add ioctl callback functions compatible with
K5.15 and above  versions

Bug 3895413

Change-Id: Id32a4fa4dec62787b7a1a1c57a4d9f1cf60d2542
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2827706
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-12-16 03:34:21 -08:00
Mohan Thadikamalla
2b21d4a86e nvethernet: Remove MAC START ioctl
Issue:
MAC START and STOP IOCTL are deprecated,
so these IOCTL calls has internally
generated failure for Linux OSD.

Fix:
Remove MAC START IOCTL from Linux OSD.

Bug 3889287

Change-Id: I19684936d22dac35df5af2393e163f51118fc8ce
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2824816
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-12-13 06:23:15 -08:00
Jon Hunter
1e04890051 nvethernet: Fix build for Linux v5.14 and v5.17+
The nvethernet driver fails to build for Linux v5.14 and Linux v5.17+
kernels. In Linux v5.15 the return type of the get/set_coalesce
callbacks were updated. In Linux v5.17 the parameters for the
get/set_ringparam callbacks were updated. In Linux v6.1 the
weight parameter for the netif_napi_add() function was removed and the
function netif_napi_add_weight() was added for passing the weight
parameter. Add the necessary kernel version checks to ensure that the
drivers build with the different versions of the Linux kernel.

Bug 3793131

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Change-Id: I56738eddd27eb4ebf7db5a2d0d031a64379482e8
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2820712
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-12-05 20:45:48 -08:00
Hareesh Kesireddy
32b805cab1 nvethernet: remove unnecessary ioctls
- Removed IPV4/IPV6/TCP/UDP ioctls.
- Added support for single L3L4 ioctl which supports all of the above.

Bug 3825731

Change-Id: Iae3cee595258abf8c908dae5a214d9da9bc8ae80
Signed-off-by: Hareesh Kesireddy <hkesireddy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2819351
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-12-05 20:41:29 -08:00
Prasun Kumar
46bc09119b nvethernet: Fix HSI Err Rpt Inj
Update nvethernet for HSI Err Rpt Inj

Bug 3877863

Signed-off-by: Prasun Kumar <prasunk@nvidia.com>
Change-Id: I6171742d2ba1c55be971069643ead713e7f5c439
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2819005
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-12-05 20:36:52 -08:00
Hareesh Kesireddy
db62bc86bb nvethernet: update l3l4 filter handling
Modified l3l4 filter ioctls based on corresponding osi changes.

Bug 3576506
Bug 3825731

Change-Id: Id9a4ce263f3526e4c5a357d74f9d55ebb59fef29
Signed-off-by: Hareesh Kesireddy <hkesireddy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2803367
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-11-30 06:17:02 -08:00
Revanth Kumar Uppala
729793fc3b nvethernet: Change registers naming convention.
Follow registers naming conventions similar to
upstream DT

Bug 3793131

Change-Id: I6c64294d7c55e3f78e5dddb007db31bdbbef63a4
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2809191
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-11-29 04:06:27 -08:00
Revanth Kumar Uppala
e37e03efd9 nvethernet: Enable nvethernet driver support
Enable nvethernet driver support for K5.15

Bug 3793131

Change-Id: I2a6d46c9173ea633931308c34e950b404f54796d
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2801126
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Mohan Thadikamalla <mohant@nvidia.com>
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-11-29 04:06:17 -08:00
Mohan Thadikamalla
d0ac6d4396 nvethernet: Update status counters using ioctls
Issue:
TSN, extra, packet error stats counters
are not getting updated during virtualization,
as NVEQOS reads them from the VF OSI core structure.

Fix:
Add new ioctls to update these counters from
the ethernet server OSI core to
the VF OSI core structure.

Bug 3763499

Change-Id: I6e82f9756afe0c2f1adefb5a2449fad479864ea6
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2809358
(cherry picked from commit ab043869fb9b1feb197496d4695b333845689e5e)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2815774
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Tested-by: Revanth Kumar Uppala <ruppala@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-11-29 04:06:13 -08:00
Bhadram Varka
61f908bce9 nvethernet: use updated init API
osi_hw_core_init updated by removing not needed arguments

Bug 3787316

Change-Id: I71230fcbac11e911fe24cfcdef20a131bb1c2ade
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
(cherry picked from commit 6027a30d9780678bdbd7f3f947f8e31adf8d0f1f)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2808751
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-by: Mohan Thadikamalla <mohant@nvidia.com>
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2022-11-29 04:06:08 -08:00
Sanath Kumar Gampa
6c7d05d9bb nvethernet: Address review comments on HSI changes
Bug 3590939
Change-Id: Id7bf154880a8f566a9807a3c3c7c210766d48c03
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2801131
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2806411
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Mohan Thadikamalla <mohant@nvidia.com>
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2022-11-29 04:06:03 -08:00
Bhadram Varka
0772521bf1 nvethernet: remove save/restore register IOCTL code
Bug 3701869

Change-Id: I8b4e67aa6420a46fda7185261c8ecbac0db90f40
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2787485
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-11-01 14:27:08 +05:30
Rakesh Goyal
e7ff48aaad nvethernet: update code to use new structure
Remove not required members of ifr_data structure.
Add structure in exported header file.
Add support in code to understand new data structure.

Bug 3704251

Change-Id: I495b34edaa6ac324933508c12a3612de4a52175b
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2782590
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-11-01 14:27:08 +05:30
Rakesh Goyal
36df82d64b nvethernet: support for adding L2 filter
Support to add L2 filter uing ioctl
when  Ethernet virtulization is enabled

Bug 3659048

Change-Id: Ib990bf5fa5762f01563b1017b8d3e0c8b02320a6
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2777262
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-11-01 14:27:08 +05:30
Mahesh Patil
c896399b53 nvethernet: Fix CERT INT31-C issues in sysfs.c
Cert error reported in
https://sccovlink:8443/reports.htm#v17826/p10248/g17826g
CID 565796

Bug 3745813

Change-Id: I1edb8bb1de6f4d28f5b1a5eaf14bc33bcb5a829c
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2765590
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-11-01 14:27:08 +05:30
Sanath Kumar Gampa
8ff195acb5 nvethernet: Add support for SAK 256 with PKCS11
Bug 3784504

Change-Id: Id2f4af4e3d882f95a76b7281d7b260ca8c32c702
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2776048
Reviewed-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-11-01 14:27:08 +05:30
Mahesh Patil
ae8ea24a6c Port wpa_supplicant nvmacsec to nvpkcs11
Adding linux driver changes required to support macsec nvpkcs11
framework api's

Bug 3573999
Bug 3345671

Change-Id: I6181b05eea08e9c329e89384fb7f23604918632b
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2692303
Reviewed-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-by: Nagaraj Annaiah <nannaiah@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-11-01 14:27:08 +05:30
Bhadram Varka
d3509d8c5d nvethernet: fix buffer re-use usage
Issue: If OSI_RX_SWCX_REUSE flag is set in OSI then
OSD will not reallocate the buffer for that descriptor
index. It will re-use the same buffer virt/physical
addresses. If that buffer is a reserved buffer then OSI
will not process that so it will result in packet drops.

Fix: Reuse the buffer is OSI_RX_SWCX_REUSE flag is set
and the buffer is not a reserved buffer.

Bug 3727058

Change-Id: I3331604a90b2cbe902d91f2082e1fe36f830decc
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2745194
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-11-01 14:27:08 +05:30
Rakesh Goyal
62f3c4ff12 nvethernet: take exported ioctl related header out
Issue: SW needs to support IOCTL on safety builds and
these header should be exposed to user

Fix: create new header file which is exposed externally

Bug 3704251

Change-Id: Ieee52b5e9ff28cefeb2435be389e3e8df0abe6d1
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2759473
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-11-01 14:27:08 +05:30
Bhadram Varka
f667be2c63 nvethernet: fix spin lock recursion
Issue:
1) dev_queue_xmit acquired the per queue tx lock and called driver
transmit routine.
2) During the transmit - common interrupt asserted which tries to
acquire the same tx lock which resulted in lock recursion.

Fix: Move the lock acquire to tasklet context under common isr.

Bug 3773016

Change-Id: I7cfd49beb1238286d3bccd9e4b9ccc054c4f6d30
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2770227
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-11-01 14:27:08 +05:30
Nagaraj Annaiah
1ffcf6d286 nvethernet: Add IVC support atomic
Issue: completion_timeout doesn't support atomic.

Fix: Remove mutex and wait event and change to poll_timeout.

Bug 3733795

Change-Id: Ieb26623ae6191d442bb2f7e2b8c6925660882cfe
Signed-off-by: Nagaraj Annaiah <nannaiah@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2759245
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mohan Thadikamalla <mohant@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-11-01 14:27:08 +05:30
Sanath Kumar Gampa
1cb18af637 nvethernet: Update the sysfs with macsec an status
Bug 3757857

Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Change-Id: I61101fcd1d8229c5e0b8e9f85aae4cea8320ef07
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2765063
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-11-01 14:27:08 +05:30
Rakesh Goyal
d4e9ecf359 nvethernet: use default selection algorithm
Issue: EQOS supports SP as default algorithm
where MGBE should support ETS as default algorithm.

Fix: We are removing user configuration option from
application. For MGBE there are CBS or ETS(default) as only
options. For EQOS CBS and SP(default) is only options.

Bug 3735907

Change-Id: I83ff3f59129e188335d9cec239d5eb0b2fa76412
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2757410
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-11-01 14:27:08 +05:30
Narayan Reddy
99acf2912b nvethernet: add lane bringup restart callback
Issue: In the current scenrio, when the remote
interface is brought down and up. There is no way
of getting the link up again with the remote device
which in turn fails the data transfers even though
interface from other end is brought up.

Fix: When interface is gone down on the other side,
MAC receives local faults and in this scenario
no data should be sent to MAC, so disable network
queues and initiate the lane bring up process for
monitoring the link status. Once the link is up,
re enable the network queues for data transfers.

Also added support for enabling driver logs using
msglvl of ethtool

Bug 3744088
Bug 3654543
Bug 3665378

Change-Id: I16cdee74e4e3ff6cd176924575f5005f385d4c5d
Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2730876
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
GVS: Gerrit_Virtual_Submit
2022-11-01 14:27:08 +05:30