Commit Graph

1019 Commits

Author SHA1 Message Date
Mahesh Patil
8c7f7328e8 osi: T264 VDMA feature and bring up changes
Bug 4043836

Ported from the change -
https://git-master.nvidia.com/r/c/nvethernet-docs/+/2896005

Change-Id: Iabbbde0d2733f04bba5d7128e7b8ac5956605424
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Signed-off-by: Michael Hsu <mhsu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3149288
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Bhadram Varka <vbhadram@nvidia.com>
Tested-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
2024-06-05 02:51:04 -07:00
Narayan Reddy
d28da6a10b xpcs: update lane programming sequence
1) Updated the HW programming sequence of XPCS lane bring up
2) As a part of the link bringup, link partners exchange fault
sequence (local and remote faults) initially. Driver was enabling
the Link fault interrupt before the fault sequence is fully complete,
so added a condition to wait until the initial fault sequence
is complete before enabling the link fault interrupt in the MAC.

Bug 4301751

Change-Id: I369023d8ed5eef8e436105148d9f28b87aab1ca1
Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3095516
(cherry picked from commit 7522e79f6d6f0b39c4ee1f3d078fbb5da45592b0)
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3133226
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-05-22 10:04:27 -07:00
Rakesh Goyal
3b1e1b7370 osi: core: Add function trace for SEQ/UML validation tests
Added RtosCWrapStringLog() based function tracing for
Ethernet Server and slogf() based function tracing for
OSD

Bug 4550849

Change-Id: I75d5fd7cbc6b27f8893265216b6599a707fb10ed
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3121802
(cherry picked from commit 90533a099885de45dae46311127e94230eb91ff3)
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3137118
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-05-21 04:20:02 -07:00
Hareesh Kesireddy
aa57af8328 osi dma: fix mgbe rx checksum flags
Issue description:
- IPV4 CSUM SW flag is always set without checking HW flags.

Fix description:
- Set IPV4 CSUM SW flag only if packet type is > 0 in rdes3.
- Check for IPHE and CSUM errors from rdes3.ellt only if
  rdes3.es bit is set.

Bug 4611476

Change-Id: Iaaf56b4cc122fd51e29f12f759ac7e3a3905a067
Signed-off-by: Hareesh Kesireddy <hkesireddy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3119885
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
(cherry picked from commit 39e36ad2cad9c7e4254c2f6eef91a7f074b207df)
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3137117
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-05-21 04:19:52 -07:00
Ajay Gupta
face9ac97b NvEthernetCL: Add function trace support
Bug 4550849

Jira NET-1363

Change-Id: I6712ff223f6844ee45793f97acf935c704288d4c
Signed-off-by: Ajay Gupta <ajayg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3097969
(cherry picked from commit d623e89d159bcc904739ede7223072966a579b9d)
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3137115
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Hareesh Kesireddy <hkesireddy@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Tested-by: Hareesh Kesireddy <hkesireddy@nvidia.com>
2024-05-21 04:19:47 -07:00
Hareesh Kesireddy
0acc3d66b8 osi: rename OSI_TRUE/OSI_FALSE macros for misra
- Renamed OSI_TRUE/OSI_FALSE macros for resolving misra.

Bug 4550849

Change-Id: Ic9d8b673c077d33295f405dd5e8e36d36eef5c75
Signed-off-by: Hareesh Kesireddy <hkesireddy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3095193
(cherry picked from commit dc768942fdee0dd8fddfc5a0d9fa5a202c13eb33)
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3137113
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-05-21 04:19:42 -07:00
Hareesh Kesireddy
4ed7e20962 osi: update OSI_TRUE and OSI_FALSE values
- Modify OSI_TRUE and OSI_FALSE values to 1 and 0 only
  to avoid l3l4 filter issues.
- Use right shift operations to resolve misra for these
  macros.

Bug 4545417

Change-Id: I23dc04fe61120e1af7f13bbeb41f748743c58344
Signed-off-by: Hareesh Kesireddy <hkesireddy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3088790
(cherry picked from commit 362b3572e27d51248c30e6dc5eb67777cb2d5ff9)
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3137112
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-05-21 04:19:32 -07:00
Narayan Reddy
d9caf2b991 osi: core: move err injec code to vltest
issue: HSI error injection logic is enabled by default
and is exposed as an ioctl which is a safety-related concern.

fix: move HSI error injection code only for
VLTEST build

Jira NET-1235
Bug 4449611

Change-Id: I9a23895249c7db52586a83a042cf514ef0e5faae
Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3077931
(cherry picked from commit 5af42a33298f5408b4209223802139501acf9d39)
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3132843
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-05-17 00:21:13 -07:00
Narayan Reddy
545dbfe28a osi: core: remove unused code
osd_msleep is no longer used, so remove it

Bug 4449611
Jira NET-1411

Change-Id: I2277506e99749d45197f88382070b596c3b9427d
Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3122916
(cherry picked from commit 11b9c5cfb950cba0fc50da0ff12aae180244e4d3)
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3134312
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-05-15 14:18:38 -07:00
Narayan Reddy
c9a9df02cf osi: core: add null check for osd call back functions
add null checks for missing osd callback functions

Bug 4449611

Change-Id: I17629774f01b346c69d331f7d89226d003a01b8e
Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3116534
(cherry picked from commit c33d6965c99981e78f3f03c7d523dd4ebc3f10ea)
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3134311
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-05-15 14:18:12 -07:00
Hareesh
19e39b43ea osi: mgbe: enable interrupt after link up
- Enable LS interrupt on link up detection.

Bug 4382126

Change-Id: Ie1177f129ce3e4f5539cebae1a5a3435f6ec2c88
Signed-off-by: Hareesh <hkesireddy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3068694
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3132892
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-05-15 14:16:11 -07:00
Bhadram Varka
a294d1ce9d osi: core: increment with actual value
Issue: Counters always incremented by one.

Fix: Increment the counter based on actual value.

Bug 4449611

Change-Id: I583da6db58524bd1c203b51da5a1208d7dcff744
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3085443
(cherry picked from commit 84fe2b1f915c81f45e2ef1cab0c3ffc8f323cd4c)
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3137111
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-05-15 13:57:54 -07:00
Rakesh Goyal
a5d304e68a osi: core: add range checker for ppb
issue: missing ppb range checker
fix: add ppb check within range of MAX_FREQ_POS
and MAX_FREQ_NEG.

Bug 4449611

Change-Id: I21e195d2f6fa015ff79f8944ccc67e994ddecf63
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3091396
(cherry picked from commit b7e30eb2fa3fd18de5f3984b8919473e24a8dfac)
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3100271
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-05-15 13:57:20 -07:00
Narayan Reddy
1ec150d96d osi: core: fix doxygen comment for macsec
Bug 4449611
Bug 4550849
Jira NET-1331

Change-Id: If98d4d3a531849b1ea9265830f5a97ba775ff08f
Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3093508
(cherry picked from commit f13c12301e060a045ef32a95651c99578ac10af0)
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3133376
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: Hareesh Kesireddy <hkesireddy@nvidia.com>
Tested-by: Hareesh Kesireddy <hkesireddy@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-05-15 13:57:10 -07:00
Narayan Reddy
c2d9f13da3 osi: core: modify core osd ops check
add check only in case of virtualization disable,
where server initializes these ops incase of QNX
and Guest OS does in case of Linux

Bug 4449611
Bug 4455158

Change-Id: I86fea0e26e8d98c6522129c8cb4c364354fb936a
Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3083330
(cherry picked from commit 142e022ebdea7cff52eb545db002a60ccf412042)
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3132847
Tested-by: Hareesh Kesireddy <hkesireddy@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Hareesh Kesireddy <hkesireddy@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
2024-05-09 03:28:22 -07:00
Mohan Thadikamalla
bcf446f5dc core: mgbe: Handle TX and RX FSMs on link status
Issue:
Unwanted timeouts for TRC, RPERXLPI, RXLPI-GMII,
and RARP FSMs are being reported during
the link down state.

Fix:
Disable TRC, RPERXLPI, RXLPI-GMII,
and RARP FSMs when link is down.

Bug 4502985

Change-Id: I7e3e5cc9c1452f4b148bcc7701d38d08b0c0ec17
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3106693
(cherry picked from commit e8b4299015b3e4a75e0c13e81469896c159d7dd3)
(cherry picked from commit 5b8d297ea2adc2d9fcbd9874292daa5463bd9afa)
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3127755
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2024-05-03 04:23:40 -07:00
Mohan Thadikamalla
ce8941f7a4 mgbe: Set MAC_FSM_ACT_Timer.NTMRMD to 5
Issue:
Regression bugs related to MGBE HSI
errors are observed due to the
enablement of MAC_FSM_CONTROL.TMOUTEN

Fix:
Based on software experiments and the hardware team's
recommendation in bug 3584387,
Set MAC_FSM_ACT_Timer.NTMRMD to 0x5  to use 256ms interval.

Bug 3584387
Bug 4502985
Bug 4502569
Bug 4502581

Change-Id: I7e29ff6673c2179bed74770f9f0bd6a6c1725fe7
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3087196
Reviewed-by: Narayana Reddy P <narayanr@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@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>
2024-03-02 09:10:43 -08:00
Sanath Kumar Gampa
15bb82c842 Initialize the FRP entries as part of core init
Bug: Uncorrectable errors are seen for every rx frame,
when FRP rules are added on EQOS

Fix: Initialize the FRP entries with Bypass rules

Bug 4502478
Bug 4449611

Change-Id: I1a5b181dbe1c7bea685b696d458ed1333e0fee88
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
(cherry picked from commit 4019a2e1d94fad7e891c8e5b973b55d430bda54d)
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3087288
Reviewed-by: Mohan Thadikamalla <mohant@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Krishna Thota <kthota@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-03-02 02:31:32 -08:00
Bhadram Varka
f8043809fc osi: fix regression stats increment
Issue: Stats are getting incremented by
one irrespective of the passed value.

Fix: Increment the counter with passed
incr value.

Bug 4506095

Change-Id: Ib8a74b8baff82657cf0935dd46638169536d45b9
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3084602
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Narayana Reddy P <narayanr@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-28 11:16:09 -08:00
Bhadram Varka
50f657461c osi: add the t19x eqos support
Bug 4506095

Change-Id: I6669ccc10db9888a14b0e03a2592de4531d43e75
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3083937
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Narayana Reddy P <narayanr@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
2024-02-28 11:16:04 -08:00
Bhadram Varka
d385f4ee2c osi: fix compilation issues
Fix compilations issues with linux safety builds

Bug 4506095

Change-Id: I2609611da6fe3110c730ef5ae67de1d503ab1700
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3081413
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Narayana Reddy P <narayanr@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2024-02-28 11:15:59 -08:00
Bhadram Varka
b6134cbb6d Merge remote-tracking branch 'origin/dev/rel-37' into dev-main
Merge the changes from rel-37 to dev-main for nvethernetrm repo.

Bug 4506095

Change-Id: Ie0509b8fd85fad5d55f0f967a433c4b7461527f1
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
2024-02-21 16:33:10 +05:30
Bhadram Varka
ac97c26d7a NvEthernetRm: Fix SWUD
Fix SWUD compilation errors

Bug 4449611

Change-Id: I28819d7a5c5f29affb1fa855aa899507e5c61020
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3072783
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-21 16:32:07 +05:30
Bhadram Varka
2e95e1f88a osi: dma: remove unreachable branch
As a part of unit testing/integration testing Rx_PBL
value is always > 256. Remove the dead code and program
with max PBL value.

Bug 4284096

Change-Id: I04d75af28065360af452f4803ab0d7eebf66e3b0
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3070963
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-21 16:32:07 +05:30
Sanath Kumar Gampa
52c1d70334 osi: core: Removal of dead code
As a part of unit testing cleaned up the
dead code and the redundunt checks

Bug 4284096

Change-Id: Ic0a8f68468b437e45d277cca5296da5232d4a5a7
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3069601
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-02-21 16:32:07 +05:30
Michael Hsu
10be2a6a3c nvethernetrm: Fix SWUD
Change-Id: Iefc4bdab12ac26662555148d76f2ca972c81a43b
Signed-off-by: Michael Hsu <mhsu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3070826
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Hareesh Kesireddy <hkesireddy@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-21 16:32:07 +05:30
Bhadram Varka
9a2f67acf6 osi: core: cleanup the code
Removed unneeded code as a part of clean up

Bug 4284096

Change-Id: I72d2315bd641f4a46c7f78029214c23599c9b831
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3063333
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Tested-by: Narayan Reddy <narayanr@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-21 16:32:07 +05:30
Bhadram Varka
d8397a68dc nvethernetcl: clean up the code
o Remove redundent checks in the code
o Remove osi_dma_memset

Bug 4284096

Change-Id: I40e3af8be3fd9b5709e22084ba21dbef71d0d3d3
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3059343
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-21 16:32:07 +05:30
Narayan Reddy
9ec6ef675b osi: core: cleanup the code
Clean up the code to remove unnecessary branches

Bug 4284096

Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Change-Id: I7cef09e14818016b68e0297cb8446d10880b1b13
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3058726
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>
2024-02-21 16:32:07 +05:30
Narayan Reddy
d68e9e1bdc osi: core: fix hsi configuration
Enable below for the HSI configuration
  RXCRCERPIE of MMC_Receive_Interrupt_Enable
  TMOUTEN of MAC_FSM_Control
  OPE of MTL_DPP_Control
  TMOUTEN of MAC_FSM_Control
  FSM_TO_SEL of VR_XS_PCS_SFTY_TMR_CTRL

Bug 4437102

Change-Id: Iaef9bc3e8e44572fd953dbc4d846d871bb2d16a0
Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3051420
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-02-21 16:32:07 +05:30
Rakesh Goyal
33aad27714 osi: core: Fix frp code
Issue: input argument check missing
Fix: fix input argument check

Jira NET-1213

Change-Id: Ia651a33ba8181a1f98bfcf48fe3c9a39869fe3e6
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3052400
Tested-by: Mohan Thadikamalla <mohant@nvidia.com>
Reviewed-by: Mohan Thadikamalla <mohant@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-21 16:32:07 +05:30
Narayan Reddy
95a00ac2ff osi: core: move code out of safety
1) Moved unused code to out of safety
2) isolate osi_update_stats_counter for
both MGBE, EQOS and make it local to OSI

Bug 4284096

Change-Id: I776e35d5a660107dd61894a4a60339ba1c399e32
Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3053656
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-21 16:32:07 +05:30
Narayan Reddy
8d1f14f607 osi: remove unused code
1) remove unused code
2) isolate osi dma and core

Bug 4284096

Change-Id: I6185d8c27213d2e9419c14e2f158e46aac7cf505
Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3052958
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-02-21 16:32:07 +05:30
Hareesh Kesireddy
c000896873 osi: fix misra 12.1 and 16.4
Bug 3697619

Change-Id: I036dc8c24bf098176ba0095e93009986aece0389
Signed-off-by: Hareesh Kesireddy <hkesireddy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3049720
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-02-21 16:32:07 +05:30
Narayan Reddy
e4c8bc9f3e osi: core: fix CG issues as per CR review
Fixed below violations
 NETWORKING_CG_003
 NETWORKING_CG_006
 Code complexity

Jira NET-1169

Change-Id: Id985b8d8ff7e79dff929f44fb7d8fd9daff3f709
Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3029471
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-21 16:32:07 +05:30
Narayan Reddy
b6a8d5cd27 osi: core: fix complexity for osi_hal_handle_ioctl
1) reduce complexity for osi_hal_handle_ioctl
2) add fixes from swits verification

Bug 4407004

Change-Id: Ib654e9ca37250e56d3849be414e0d34e51058995
Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3046584
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>
2024-02-21 16:32:07 +05:30
Narayan Reddy
20c829cdc4 osi: core: fix complexity for freq_offset_calculate
reduce complexity for freq_offset_calculate

Bug 4407004

Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Change-Id: I5119a60cbe44a45be27a5351ec30277e04e47a67
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3046514
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>
2024-02-21 16:32:07 +05:30
Narayan Reddy
98d9dca1f7 osi: core: fix complexity for gcl_validate
reduce complexity for gcl_validate

Bug 4407004

Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Change-Id: Ibd5e4b09873f3bf4937a2bc7917112b13aa018d8
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3046435
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>
2024-02-21 16:32:07 +05:30
Narayan Reddy
64cdd41980 osi: core: fix complexity for mgbe_handle_mtl_intrs
reduce complexity for mgbe_handle_mtl_intrs

Bug 4407004

Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Change-Id: I98e19564666d27512dc841760659f2bb3297b6f6
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3046194
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>
2024-02-21 16:32:07 +05:30
Narayan Reddy
c45e3e94c5 osi: core: fix complexity for mgbe_handle_mac_intrs
reduce complexity for mgbe_handle_mac_intrs

Bug 4407004

Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Change-Id: Id45dbda7dc4567b9c57ced84dc70e93b6feea6e1
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3046187
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@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>
2024-02-21 16:32:07 +05:30
Narayan Reddy
1627807acb osi: core: fix complexity for mgbe_handle_hsi_intr
reduce complexity for mgbe_handle_hsi_intr

Bug 4407004

Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Change-Id: I02dda7e41489e23c081f9d0127627e8c4e9bead7
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3046172
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
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: Ashutosh Jha <ajha@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-21 16:32:07 +05:30
Narayan Reddy
2450563f0c osi: core: fix complexity for hw_config_fpe
reduce complexity for hw_config_fpe

Bug 4407004

Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Change-Id: Ic9d7e1bf1d9812cd86da1f44745d11ba9f13db3c
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3046165
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>
2024-02-21 16:32:07 +05:30
Narayan Reddy
d4d5c3d677 osi: core: fix complexity for frp_entry_add
reduce complexity for frp_entry_add

Bug 4407004

Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Change-Id: I308c73b101dadf4bee06b7ac87b5b8df34924c8e
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3046148
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>
2024-02-21 16:32:07 +05:30
Narayan Reddy
c004af3e0f osi: core: fix complexity for xpcs_init
reduce complexity for xpcs_init

Bug 4407004

Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Change-Id: Iaf9944fa095f8c54da3ee399b388b1feb522b373
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3046124
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@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>
2024-02-21 16:32:07 +05:30
Narayan Reddy
42bed25699 osi: core: fix complexity for hw_config_est
reduce complexity for hw_config_est

Bug 4407004

Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Change-Id: Id563bcfdc7e1d2e2290e0aedc567b29811811860
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3045983
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>
2024-02-21 16:32:07 +05:30
Narayan Reddy
6980eb0273 osi: core: reduce complexity for 2 functions
Reduce complexity for below functions
1) eqos_core_init
2) eqos_handle_mtl_intrs

Bug 4407004

Change-Id: I97ddf97fd9a9f054eff674485a8bf3eb6848e5de
Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3045865
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>
2024-02-21 16:32:07 +05:30
Narayan Reddy
6bd46f191a osi: core: reduce complexity 4 functions
Reduce complexity for below functions
1. handle_rx_irq
2. xpcs_start
3. osi_hal_init_core_ops
4. hw_set_speed

Bug 4407004

Change-Id: Id706b411d49fb177650a55fc640e379693bd9f82
Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3045717
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>
2024-02-21 16:32:07 +05:30
Narayan Reddy
8751b9cd8a osi: core: reduce complexity for 5 functions
Reduce complexity for below functions -
1. drift_calculation
2. mgbe_set_avb_algorithm
3. osi_hal_hw_core_init
4. osi_init_core_ops
5. handle_tx_irq

Bug 4407004

Change-Id: Ifbb6249eaf68f208b192b37165e6e9a1eda9a310
Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3045689
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>
2024-02-21 16:32:07 +05:30
Bhadram Varka
af595746a5 osi: dma: reduce complexity for hw_transmit and tx_complete
Bug 4407004

Change-Id: I7842d7eca8d2c4bd4d8d9aa8c5b621079ccf4f04
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3046317
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Hareesh Kesireddy <hkesireddy@nvidia.com>
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-21 16:32:07 +05:30
Bhadram Varka
8d70fe08e7 osi: dma: reduce complexity for mgbe_get_rx_hwstamp
Bug 4407004

Change-Id: I98ff025805cfe4c04a1c69eecc1e7ad9b49c279f
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3040753
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Hareesh Kesireddy <hkesireddy@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-21 16:32:07 +05:30