Commit Graph

298 Commits

Author SHA1 Message Date
Srinivas Ramachandran
1e8dfafa84 osi: Use osd_usleep vs osd_udelay appropriately
Issue: osd_udelay is used irrespective of the
       duration of the delay/sleep. In certain
       environments like HVRTOS, udelay is a
       busy loop and it starves other tasks on the CPU.
Fix:   Use udelay only for small tight checks, and use
       usleep for larger delays.

Bug 4676601

Change-Id: I59d9a403f34d46c6e2d17ca6f7e8a277d5283db5
Signed-off-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3176350
(cherry picked from commit c2abe16a34af853f86fcaa4bb91b7036e2a8eb79)
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3250083
Reviewed-by: Hareesh Kesireddy <hkesireddy@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Hareesh Kesireddy <hkesireddy@nvidia.com>
2024-12-04 08:06:03 -08:00
Sanath Kumar Gampa
25a07d7228 osi_core: macsec: Reorg MACSec code for DOS-SHR-10437
Reorganize MACSec source code to accommodate N1Auto MACSec HW IP OSI
driver.

Separated MACSec hardware-specific code into a different static lib

Bug 4874880

Change-Id: I74e4cca8ba615def283ec938cc94985d32099190
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3214907
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Mahesh Patil <maheshp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2024-10-29 08:12:49 -07:00
Mahesh Patil
c8bea5c22f osi: Properly set the dma chan bits
- Properly set the dma chan bits for chan > 31 in receive chan list
  bitmap when filters are added
- Fix delete condition for T264 when filter is deleted

Bug 4844451

Change-Id: Ia9f9e7a99b5b3d10813d10aded55061754ed1824
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3209203
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
2024-09-23 12:50:54 -07:00
Bhadram Varka
2e3848b279 mgbe: pcs: Fix offset for T26X_XPCS_WRAP_INTERRUPT_CONTROL
Fix the offset for T26X_XPCS_WRAP_INTERRUPT_CONTROL
and removes unused macro.

Bug 4778785

Change-Id: I3f2ac54c8119727f05fc77348d95b12e9ac3f525
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3199177
Reviewed-by: Narayana Reddy P <narayanr@nvidia.com>
Reviewed-by: Krishna Thota <kthota@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-08-28 16:59:22 -07:00
Narayan Reddy
a81ae285f2 osi: core: mgbe: Program ANP value for 25G
Issue: Seeing an increment in the ping RTT when
FRP rule is enabled in 25G.

Fix: by default ANP value is 5, which is recommended
for 10G. For 25G we need to change it to 3 as per HW
team suggestion.

Bug 4745125

Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Change-Id: I2e2cc0f49199908fb5919d0b29da2850030e6be2
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3197679
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-08-22 13:35:28 -07:00
Narayan Reddy
c172c2201f mgbe: enable DRCHM for mmc rx counters
Issue: MMC Rx counters are not getting incremented

Fix: Enable DRCHM MMC_Control register for the
Rx counters to get incremented

Bug 4742494

Change-Id: I2dec776f12a0ecaeb4e3bfd1f4e040e9d7490e45
Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3180193
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
2024-08-22 13:18:36 -07:00
Rakesh Goyal
eeeb693843 osi: fix ptp tx timestamp for vdma
Issue: PTP time sync not working for vdma other
       than 0.
Fix: Fix integration error from side branch to
     dev-main by adding missing code. Now PTP time
     sync works for any vdma

Bug 4768411

Change-Id: I7f5727f5a0ba66de9baf8983707c54e02e7ef25e
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3182405
Reviewed-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Krishna Thota <kthota@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
2024-08-01 06:04:41 -07:00
Mahesh Patil
cfdfccb488 osi: FSI EQOS driver bring up
Bug 4552441

Change-Id: I490f9680cc7a71754a64035fb7c63ba56d0287ba
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3166031
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Reviewed-by: Michael Hsu <mhsu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-07-28 21:35:56 -07:00
Mahesh Patil
c479ba1650 osi: T26x EQOS changes
1) Added T26X EQOS bring up changes
2) Fixes added during bring up

Bug 4639097

Change-Id: I0036a12ad08d690bb62a655df6f4efd26a0bf585
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3152936
Tested-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-by: Narayana Reddy P <narayanr@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-06-18 11:37:38 -07:00
Mahesh Patil
ed305924de osi: Add support for XLGPCS for 25G speed
Ported from -
https://git-master.nvidia.com/r/c/nvethernet-docs/+/2953123

Bug 4599341

Change-Id: I2d0f8b871a081b4c30f586854ab0f56b84e9bfe3
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Signed-off-by: Michael Hsu <mhsu@nvidia.com>
2024-06-06 00:37:38 +00:00
Mahesh Patil
13e42ef1d2 osi: update T264 mgbe perf configs
Update MGBE perf configs as per IAS recomendations

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

Bug 4228205

Change-Id: I76f55f2f613417728def92a997957a2f6d18099b
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Signed-off-by: Michael Hsu <mhsu@nvidia.com>
2024-06-06 00:37:38 +00:00
Mahesh Patil
caae00f95b osi: Mask MMC_IPC_Rx_Interrupt_Mask interrupts
Ported from -
https://git-master.nvidia.com/r/c/nvethernet-docs/+/3072520

Bug 4297728

Change-Id: I9e14e9ebfe6a40f793e2ebd3c0aede0b95018466
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Signed-off-by: Michael Hsu <mhsu@nvidia.com>
2024-06-06 00:37:38 +00:00
Rakesh Goyal
b3b589004f osi: ptp support for upcoming chip
Support for PTP and TSN added

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

Bug 4221043

Change-Id: I68287c3961aa194c30ca265dfe646e733fcb52cc
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com>
Signed-off-by: Michael Hsu <mhsu@nvidia.com>
2024-06-05 12:07:09 +00:00
Mahesh Patil
0c2228a485 osi: configure mtl Q's size
Max Tx/Rx MTL Q size in uFPGA is 64K, so adjust
Tx/Rx MTL Q's accordingly

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

Bug 4413578

Change-Id: I7510cb230bd1400dd1ce565092b445c6a6def30d
Signed-off-by: Michael Hsu <mhsu@nvidia.com>
2024-06-05 12:07:09 +00:00
Mahesh Patil
275769b28a osi: Allow more than 31 l2 filter index
Ported from -
https://git-master.nvidia.com/r/c/nvethernet-docs/+/3027948

Bug 4297989

Change-Id: I0365f2136b5d7519946113fc728a58ed8fcccab4
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Signed-off-by: Michael Hsu <mhsu@nvidia.com>
2024-06-05 12:07:09 +00:00
Mahesh Patil
84310ba297 osi: In T26x, Q2TCMAP field marked reserved
Avoid read/writing to MTL_TxQ0_Operation_Mode[Q2TCMAP] as
it is marked reserved.

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

Bug 4287563

Change-Id: I578a647200c967449bdda94ea0f34a0895bff393
Signed-off-by: Michael Hsu <mhsu@nvidia.com>
2024-06-05 12:07:09 +00:00
Nagaraj Annaiah
23dc94a26a osi: Add FRP and L2 support for t264
Ported from -
https://git-master.nvidia.com/r/c/nvethernet-docs/+/2992833

Bug 4334269

Change-Id: Iceade85fa54b407135ec94b4bb11cc204132efe0
Signed-off-by: Michael Hsu <mhsu@nvidia.com>
2024-06-05 12:07:09 +00:00
Mahesh Patil
c604c5f2f2 osi: Macsec bring up for t264
Ported from -
https://git-master.nvidia.com/r/c/nvethernet-docs/+/2904857

Bug 4122114

Change-Id: I85248181de4898293672a56199044e2deea5729a
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Signed-off-by: Michael Hsu <mhsu@nvidia.com>
2024-06-05 12:01:50 +00:00
Mahesh Patil
0c152e73d9 osi: Add T264 changes to include 48 filters
Add support to include 48 filters for T264 from feature register

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

Bug 4291865

Change-Id: Ib1e81932798d5d3c77679e8c3645887a9ad70faa
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Signed-off-by: Michael Hsu <mhsu@nvidia.com>
2024-06-05 12:01:50 +00:00
Sanath Kumar Gampa
801a28ceab osi: mgbe adding correct SID for SMMU
Lower 8 bits of the StreamID are obtaioned from MGBE registers and the
upper 8 bits are obtaioned from MSS HW. Programming lower 8 bits to 0s
in non-virtualization case. Once virtualization is enabled for other VFs
of MGBE diferent lower 8 bits of StreamID have to be programmed.

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

Bug 3891884

Change-Id: I0d5587c71b7b497143a2bab3ae262b759b5e4526
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Signed-off-by: Michael Hsu <mhsu@nvidia.com>
2024-06-05 12:01:50 +00:00
Mahesh Patil
f8df147841 osi: T264 Ethernet NET07 bring up
- Update the mac version
- Program PDMA receive enable
- Program DDS bit of DPCSEL register as XDCS is removed for T26x

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

Bug 4266891

Change-Id: Icf7e9df4033a9ea6af3c8d5759694717c0cf1145
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Signed-off-by: Michael Hsu <mhsu@nvidia.com>
2024-06-05 12:01:50 +00:00
Mahesh Patil
992e66178b osi: T264 VDMA 20 channel support
Enable VDMA 20 channels and interrupts

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

Bug 4043836

Change-Id: I4c22c7006c8813d9b39fe54d872b28ca7c123c74
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Signed-off-by: Michael Hsu <mhsu@nvidia.com>
2024-06-05 12:01:50 +00:00
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
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
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
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
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
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
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
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
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
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
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
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
Hareesh Kesireddy
a57237aa17 osi: fix misra 5.7 issues
- Fixed misra 5.7 issues.

Bug 3697619

Change-Id: I59be90c3e0fdb40be6a91bbc20ccfa6c200bef53
Signed-off-by: Hareesh Kesireddy <hkesireddy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3031953
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-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@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
Hareesh Kesireddy
2ce3d07587 osi: fix misra issues
- Fixed misra issues in core and dma.

Bug 3697619

Change-Id: I5cdffad45d2e14c7715996bcdf1ad6f6066fc623
Signed-off-by: Hareesh Kesireddy <hkesireddy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3025066
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: Bhadram Varka <vbhadram@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
Sanath Kumar Gampa
e66dd0900d Enable mgbe/eqos IPG per MACSEC recommended values
Remove OSI_STRIPPED_LIB define for IPG programming as that is needed
when macsec is enabled
Addition of input pramater validation for exposed APIs
remove osi_macsec_update_mtu as that is not being used by server
anymore.

Bug 4301429

Change-Id: I0bb4ee44a18d49e47e8e6ee5b8323f09be860041
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2985696
Reviewed-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-by: Krishna Thota <kthota@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-21 16:32:07 +05:30
Narayan Reddy
ce331ed69a nvethernetrm: Fix doxygen comments for SWUD-LITE
JIRA NET-1083

Change-Id: I830e5fc37017e55eb18c4b52037afd26a1558308
Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2984061
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: Krishna Thota <kthota@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-21 16:32:07 +05:30
zuyih
487f6ec6d0 osi: mgbe: Disable LSI before UPHY lane bring up after local fault
Issue: On the Dual Orin XFI to XFI connection design,
During the boot or interface up/down test,
SOC1 generate local fault but the lane_restart_task
may not be scheduled on both SOC1 or SOC2, then it may
continuously generate local fault and cause interrupt storm.

Fix: if local fault happens, Disable the Link Status interrupt
before the lane_restart_task, the Link Status interrupt will be
enabled by hw_set_speed which is called after lane bring up task.

Bug 4045175

Change-Id: If7111e901e3bd059693250ade8b98a6d35829409
Signed-off-by: Zuyi Hu <zuyih@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2978135
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: Krishna Thota <kthota@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-21 16:32:07 +05:30
Bhadram Varka
515a13850c osi: core: support pause frames
Enable pause frames for Safety builds as well based
on pause_frames if the osi_core->pause_frames is
set to OSI_PAUSE_FRAMES_ENABLE based on DT parameter
nvidia,pause_frames.

Bug 4186472

Change-Id: I8600ae0ce1a9d9a5dd132a949ec14e8d73735319
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2931298
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
Mohan Thadikamalla
795cc66bde osi: mgbe: Update HSI error for DOS-SHR-6424
Issue:
For DOS-SHR-6424 SHR reported ID handling
is offloaded to HV. And new error IDs and
attributes are defined. So this needs
to be updated.

Fix:
Deprecate reported ID update on OSI.
And updated OSI error codes based
on the DOS-SHR-6424 SHR.

Bug 4158001

Change-Id: I28561325f921f51560aeb58fce38a0e61ba43c83
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2931112
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@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
ebad247c79 osi: mgbe: Enable LSI only after UPHY lane bring up
Issue: During boot or interface up/down test local
fault interrupts observed during UPHY lane bring up
and which resuts in scheduling the UPHY lane bring up
again. With this HW is generating the continuous local
faults and link ok interrupts. This causes CPU to stall.

Fix:
Enable Link Status interrupt only after the PCS block
lock is a success.

Bug 4076432

Change-Id: I00049900d5d687cc043b184a7b87cc68a2651aea
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2893961
(cherry picked from commit 438811eb89ab5826df17349c1be9128d28e897f1)
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2894368
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Krishna Thota <kthota@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-21 16:32:07 +05:30
Hareesh Kesireddy
1e0ff77334 osi: l3l4: disable IPFE when wildcard enabled
- Having IPFE set causes MAC to drop all packets which
  do not match with configured l3l4 filters. Hence
  disable IPFE related code using a compile switch.

Bug 3576506

Change-Id: Ibf6c0e724141c9f7dc16a41de476057fc8eb7835
Signed-off-by: Hareesh Kesireddy <hkesireddy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2834367
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
deea5c79a3 osi: core: fix Doxygen warnings
1) Fix Doxygen warnings
2) include debug.h code only when OSI_DEBUG
is defined

JIRA NET-570

Change-Id: I5d002b959925bec3898cc2faafe3f506b3c9bd22
Signed-off-by: Narayan Reddy<narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2847327
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-02-21 16:32:07 +05:30