Commit Graph

422 Commits

Author SHA1 Message Date
Rakesh Goyal
158ea57641 nvethernet: Protect Tx timestamp list
add_skb_node() added to delete the old entries from the list
but this can concurrently create the issue with ether_get_tx_ts()
either from the workqueue or direct call from tx done routine.

Protect the concurrent access of Tx timestamp list from add_skb_node()
and ether_get_tx_ts().

Bug 3927990
Bug 4088361

Change-Id: Ifae84a072d7d16b259178f2a8e79c2065ce837d8
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2842411
(cherry picked from commit 8509d3060cc697cf43c3194521575f859de53e39)
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com>
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2895045
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-05-04 11:35:32 -07:00
Mohan Thadikamalla
756347cd7f nvethernet: Fix invalid KWT fail on NDAS
Issue:
KWT test is getting failed on
NDAS build due nvethernet
driver warnings.

Fix:
Remove unrelated nvethernet
driver warnings

Bug 3935448
Bug 4088361

Change-Id: Ic76a42b2aab2f95ae8b9f89c7823693d58c37f33
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2854306
(cherry picked from commit bb1910bfd1a5305dee9302b2d8fde081e391c516)
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com>
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2897233
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-05-04 11:35:22 -07:00
Sushil Singh
a397076302 nvethernet: Add NULL check for phydev in eee init
Issue:
During eth0 down case, the link change gets called twice,
1. due to ndo close
2. due to interrupt generated by phy.
The ether_adjust_link callback also configures the EEE settings
and calls phy_init_eee (a phy framework API) for the same.
Here a race condition occur, when ether_close sets phydev to NULL
before the phy_init_eee gets called (from ether_conf_eee) which tries
to deference the phydev causing kernel panic.

[35779.541305] Call trace:
[35779.544018]  phy_init_eee+0x24/0x290
[35779.547455]  ether_conf_eee+0x110/0x1310 [nvethernet]
[35779.552525]  ether_conf_eee+0x4e0/0x1310 [nvethernet]
[35779.557840]  phy_link_change+0x40/0x90
[35779.561603]  phy_state_machine+0x190/0x240
[35779.565643]  process_one_work+0x1c4/0x4d0
[35779.569396]  worker_thread+0x54/0x430
[35779.573072]  kthread+0x148/0x180
[35779.576586]  ret_from_fork+0x10/0x34
[35779.580069] Code: a90153f3 d5384113 a9025bf5 12001c36 (f941b801)
[35779.586195] ---[ end trace 2ea5b6492f36b0cb ]---
[35779.590737] Kernel panic - not syncing: Oops: Fatal exception

Fix:
Add a NULL check and return -ENODEVICE in EEE configuration

Bug 3877272
Bug 3920560
Bug 3865666
Bug 4088361

Change-Id: I2b26c6eeabb7a109b9d14b3bd2a035f5c3b3c6fa
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2854404
(cherry picked from commit 40606dc247eacf2a8987687777874575d9037058)
Signed-off-by: Sushil Kumar Singh <sushilkumars@nvidia.com>
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2855237
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-05-04 11:35:12 -07:00
Narayan Reddy
90ec9bc532 nvethernet: turnoff carrier in link down
Issue: ethtool status shows link detected as
yes even though the link is down

Fix: turnoff the carrier when link down is received
so that ethtool status shows the current status
of link.

Bug 3806700
Bug 4088361

Change-Id: I9a68867280690c22a7b4daa225059d576ae5bb7b
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2828301
(cherry picked from commit be8d9423b4ed30e75ac9e5cff87add1d492d152e)
Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2895044
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-04 11:35:02 -07:00
Rakesh Goyal
f9f6447c30 nvethernet: remove EQOS_GET_CONNECTED_SPEED from export ioctl
Remove EQOS_GET_CONNECTED_SPEED	from export IOCTL.
Reference application can use it ethtool for speed

Bug 3812806
Bug 4088361

Change-Id: I56b47eaef9da3adc03ad9269dde26f520419b2b0
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2828652
(cherry picked from commit 4859987708858e1cb048ab4f6c784d2057131511)
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com>
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2897232
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-04 11:34:57 -07:00
Mahesh Patil
44419231b0 nvethernet: eqos pad calibration reg offsets
Make eqos pad calibration reg ETHER_QOS_AUTO_CAL_CONFIG_0 offsets
AUTO_CAL_PD_OFFSET and 	AUTO_CAL_PU_OFFSET configurable as per
customer boards tuning

Bug 3846183
Bug 4088361

Change-Id: I77521f83cac56650c6a6d1a2dd8b8c7cbdc3f3fc
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2806180
(cherry picked from commit 8eea133d313ba3b1b4ced9f58a65ecf870a2b0e6)
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2897231
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-05-04 11:34:52 -07:00
Laxman Dewangan
c69d77a04a nvethernet: Rename srctree.nvidia to srctree.nvidia-oot
Replacing the env variable srctree.nvidia with
srctree.nvidia-oot as everything needed for this
driver is in the nvidia-oot source.

Bug 4087103

Change-Id: Iad960d101a91e74d14f4889f1ec745ff21ff337f
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2894616
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-27 08:15:06 -07:00
Mohan Thadikamalla
6129bcc538 nvethernet: Clear VLAN tag stripping
Issue:
Observed VLAN ping failure on Linux safety builds.

Fix:
Clear VLAN tag stripping on nvethernet drivers.

Bug 4081795

Change-Id: I08936e2afa1fe1111570cf0cea6aa0cbe463e157
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2891932
Reviewed-by: Bhadram Varka <vbhadram@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: Sumeet Gupta <sumeetg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-27 08:00:55 -07:00
Sanath Kumar Gampa
d07b3d604c nvethernet:MACSEC, add byp lut with VF MAC
Issue: If the supplicant is killed for some reason Data would flow
plain on that interface, this needs to be avoided

Fix: Update bypass LUT such that if the frames from the VF(on which
supplicant is launched) is received on MACSEC either authenticate the
same or drop. Along with this handles below items as well. All the VFs MACIDs
are obtained in OSI to update the bypass LUTs to decide on which VF frames
to be authenticated and which VF frames needs to be bypassed.

1. Remove osi_macsec_en API and have single API to init and deinit
2. Remove explicit command from supplicant to set control port and
set protected frames. Handle the same in osi_macsec_init

Bug 3984665

Change-Id: I8bc8aa95d1e21e99e992b471fb70ed58073163f7
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2878515
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-21 11:35:13 -07:00
Jon Hunter
11cff41889 net: nvethernet: Fix build for Linux v6.3
Upstream commit 99d5fe9c7f3d ("net: mdio: Remove support for building C45
muxed addresses") removed the definition MII_ADDR_C45 breaking the build
for the nvethernet driver for Linux v6.3. Update the driver to use the
OSI_MII_ADDR_C45 instead.

Bug 4014315
Bug 4075345

Change-Id: I98f8d10ce1a093d458d293b286a4e5a544d48d04
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2889876
Reviewed-by: Rohit Khanna <rokhanna@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-19 10:57:57 -07:00
Laxman Dewangan
846435a74c drivers: Remove Kconfig files
The kconfig files from nvidia-oot will not get
parsed as the drivers in nvidia-oot are out tree and
does not support any config variable.

Bug 4074863

Change-Id: I6825a94c56404a6860dea9f2afd1ca3bc68e10a4
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2889266
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-19 10:54:28 -07:00
Sheetal Tigadoli
7a3a094915 drivers:net:oak: Add module_device_table entry
Add module_device_table entry to support
autoloading of the driver

Bug 3882239

Change-Id: I6b33bea9f63bea031dadc8e40d153c9f2478ac51
Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2883183
(cherry picked from commit eb3c7ffa28dfec24786041bf59d947fee23e9e0c)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2887730
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-16 12:55:09 -07:00
Revanth Kumar Uppala
580358e6a2 nvethernet: macsec: Fix crash during suspend
Issue: MACSEC is not enabled in DT for eqos_1 and mgbe2_1
interfaces which makes macsec_pdata pointer to NULL.
During suspend/resume macsec_pdata pointer accessed without
NULL check which resulted in crash.

Fix:
o Add NULL pointer checks for macsec_pdata in suspend and resume.
o Remove unnecessary checks for macsec in suspend and resume.

Bug 4060718

Change-Id: I00e042d979e115c088696a8964496ed0054360e5
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2888289
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-14 23:36:47 -07:00
Manish Bhardwaj
364ae3ed23 mttcan: wait to flush CAN messages
Using this patch we are waiting for CAN messages
to get flushed before going to suspend during
sc7 cycle

JIRA ESLC-7354

Change-Id: Ie368fd9e6b119df71646bf5fddbd89ae2f7c5697
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2881872
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-06 10:16:08 -07:00
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
Laxman Dewangan
1d719d1580 can: mttcan: Fix fall through warning
There is 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".

Bug 4052299

Change-Id: Ie1fd5a056bd7b6a79f12b73a23a5b0083f08ab55
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2880033
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>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-01 10:55:02 -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
Manish Bhardwaj
183b86a656 Revert "drivers: Disable broken drivers for Linux v6.3"
Bug 4014315

This reverts commit 877b293bd79071028709ea47deb8fc87d5d65f6c.

Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Change-Id: Ic043c3d18f095a056fa82182664a8b2bf0a52847
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2868424
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-03-25 02:41:40 -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
72cf7c99c3 mttcan: fix kernel compilation issue
fix compilation issue when building mttcan driver
with 6.3-rc1 upstream kernel.

Bug 4014315

Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Change-Id: I33c15af15fa8db1ac0cbb1c619db5429a6495a80
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2868425
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-03-21 02:35:01 -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
Manish Bhardwaj
e04d8c343f nvidia-oot: fix sparse errors in mttcan driver.
Using this patch we are fixing below sparse
errors :-
1. drivers/net/can/mttcan/native/m_ttcan_linux.c:627:66:
   warning: Using plain integer as NULL pointer
2. drivers/net/can/mttcan/native/m_ttcan_linux.c:658:56:
   warning: Using plain integer as NULL pointer

Bug 3954363

Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Change-Id: I1dcf51b0a765ee47ee3fae06c1ed31f0d5e84230
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2863100
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-03-01 10:27:26 -08:00
Manish Bhardwaj
bc5669d198 nvidia-oot: remove support of tegra hvnet driver
Using this patch we are removing the support for
tegra hvnet driver since this is not needed any longer
becasue L+L support has been deprecated.

1. drivers/net/tegra_hv_net.c:361:1: warning: symbol
   'tegra_hv_net_get_stats64' was not declared.
    Should it be static?
2. drivers/net/tegra_hv_net.c:704:19: warning: assignment
   to ‘const void *’ from ‘int’ makes pointer from integer
   without a cast [-Wint-conversion]
3. drivers/net/tegra_hv_net.c:704:26: warning: incorrect
   type in assignment (different base types)

Bug 3954363

Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Change-Id: I73e7071c1ec4c64072b409e46948aa2e75364be6
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2863099
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-03-01 10:27:21 -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
Manish Bhardwaj
aa5d06bcd3 nvidia-oot: fix Coverity defects
Using this patch we are fixing coverity defects in
CAN and storage OOPS driver.

CID 10132028: Unchecked return value (CHECKED_RETURN)
CID 10166522: Uninitialized scalar variable (UNINIT)
CID 10166537: Uninitialized scalar variable (UNINIT)
CID 10166580: Uninitialized scalar variable (UNINIT)

Bug 3952896

Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Change-Id: I3caf0a9121a4480567ce32c6777b547901f24815
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2860630
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-21 03:42:27 -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
Jon Hunter
4cf27b4441 net: can: mttcan: Fix build for Linux v5.14
Building the mttcan driver currently fails for Linux v5.14 with the
following error ...

 drivers/net/can/mttcan/native/m_ttcan_linux.c:1535:2: error: unknown
 field 'ndo_eth_ioctl' specified in initializer
  .ndo_eth_ioctl = mttcan_ioctl,

Fix this by using the appropriate field name for Linux v5.14.

Bug 3820317
Bug 3896592

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Change-Id: I822d988b097350538fbf4a568181e9fde9928ea3
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2836716
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-01-04 06:57:46 -08:00
Manish Bhardwaj
b0d4743a8b can: reinitialize message ram during resume
Getting below error while data transfer on CAN bus
when target coming out of SC7 cycle.
mttcan c310000.mttcan can0: mram Bit error detectedand uncorrected

reinitialize message ram in resume path to fix this issue

Bug 3837424

Change-Id: Ice275511fd04a91e30665f8ff826da6364b4e4fa
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2795002
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: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2832904
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-12-26 06:48:39 -08:00
Manish Bhardwaj
983e121cff nvidia-oot: changes ioctl callback handler
callback handler has been changed in k5.15 so
update ioctl callback handler to invoke
mtttcan ioctl handler

Bug 3896592

Change-Id: I363134263ec8b1d0929847a02251baf3d7bf4940
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2832903
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-12-26 06:48:30 -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