Commit Graph

306 Commits

Author SHA1 Message Date
Revanth Kumar Uppala
9831027796 nvethernet: Support both DT flags to maintain backward compatibility
In the previous release for T264 platforms,the restart lane bringup
logic was controlled through the device tree flag
'nvidia,pcs-rx-eq-sw-ovrd'.
In incremental releases, the flag has been renamed
'nvidia,force-restart-lane-bringup'.

To maintain backward compatibility with older device trees,
the driver now checks for both flags.If either flag is present,
restart lane bringup is executed.

The legacy flag 'nvidia,pcs-rx-eq-sw-ovrd' is deprecated.

Bug 5017313

Change-Id: I24040f508ef776e29a0bb0c1f07d4a74fa4cc8cc
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3471233
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-10-24 16:27:28 -07:00
Rakibul Hassan
f374450381 coe: Add Camera Over Ethernet cababilities
The following change is a squash change that aims to reintroduce
Camera Over Ethernet (CoE) functionality to kernel.

Bug 5401884
Bug 5419655

Change-Id: Id2fc0263c43ed8566241dbf712aa603a3b3a76f4
Signed-off-by: Rakibul Hassan <rakibulh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3419627
Reviewed-by: Anubhav Rai <arai@nvidia.com>
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Igor Mitsyanko <imitsyanko@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
2025-07-30 07:15:10 -07:00
Igor Mitsyanko
27970204aa disable MACSEC interrupts
Change-Id: I4c76c6807717527582c96cec51617aa73a4c211a
2025-07-24 10:20:36 +00:00
Revanth Kumar Uppala
15c7804551 nvethernet: Add support for RX EQ SW ovrd flag
Add flag to protect RQ EQ SW override logic in OSI from executing for
other platforms except jedha

Bug 5277708
Bug 5017313

Change-Id: I826523cfbae67017a48576b4f802b7a3eeebfaf9
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
(cherry picked from commit b2df171faa368e93b1331e58d3b31cee753c0607)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3383665
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: Narayana Reddy P <narayanr@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
2025-07-24 10:20:35 +00:00
Narayan Reddy
38227b2177 nvethernet: add SIOCGHWTSTAMP support
issue: facing an unsupported ioctl error while
launching the ptp4l, since get timestamp configuration
support is not there.

fix: add get timestamp configuration ioctl support

Bug 5274698
Bug 5287071

Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Change-Id: I9254b041d4d3b9dc2cddebc14dc6100ed1b76807
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3366858
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
2025-07-24 10:20:35 +00:00
Narayan Reddy
29ee31019b nvethernet: remove ETHER_PRV_TS_IOCTL support
remove ETHER_PRV_TS_IOCTL since it is not longer used.

Bug 5265084

Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Change-Id: If3fd6d82b67812e25c9146569d2ff2f0e8dab5f4
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3367197
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
2025-07-24 10:20:35 +00:00
Zhongjie Wang
1d5c9f1143 nvethernet: Add capability checks for ioctls
Issue description:
- Some privileged ioctl commands lack capability checks,
  so a malicious user can configure ethernet HW with those
  ioctl commands.

Fix description:
- Revisited all ioctl commands in nvethernet and added
  missing capability checks for privileged ioctl commands.

Jira NET-2865

Signed-off-by: Zhongjie Wang <zhowang@nvidia.com>
Change-Id: Idae1d72f205ca24a02693274668cdff58f4d12e9
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3337486
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
2025-07-24 10:20:35 +00:00
Bhadram Varka
90d4d4e1c4 nvethernet: Fix IRQ type mismatch warning for common IRQ
Issue:
Kernel logs reported an IRQ type mismatch warning for
the Common IRQ, as it was assigned to the Ethernet server.

Fix:
Skip reading and requesting the Common IRQ when virtualization
is enabled.

Bug 5248491
Bug 5091879

Change-Id: I54d145b2f1c1dfbc42a0e0d2f686f1bb085119c4
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3341674
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Mohan Thadikamalla <mohant@nvidia.com>
2025-07-24 10:19:19 +00:00
Sanath Kumar Gampa
7fec719a7c nvethernet:Move blocking MACSec in PHY to server
Removed the below functionality from Linux OSD as we moved
the same to ethernet server to avoid implementation in QNX OSD

- Restrict enabling MACSec in PHY

Bug 5221921

Change-Id: I0cbdeccfe91a67060a4609b9b8bc2bf842547b99
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3341020
Reviewed-by: Narayana Reddy P <narayanr@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:18 +00:00
Bhadram Varka
ebee392608 nvethernet: pass MDC CR from DT
o Add nvidia,mdc-cr property reading
o Set the default values if property is not present
   EQOS = 6
   MGBE = 5
o Remove CMD MDC CONFIG which is not required.

Bug 5147775

Change-Id: I84c382745b862f73ffecb3a4ea15fe56b79d63e4
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3336145
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:18 +00:00
Sanath Kumar Gampa
5a5cf6254f nvethernet: handling new CERT errors
CERT INT08-C
CERT STR07-C

Jira NET-2907

Change-Id: If331caf9838840073792de5ac722f268920c4a87
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3328902
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:18 +00:00
Narayan Reddy
abd6b1a506 nvethernet: update dereferring of ioctl_data
structure variables inside ioctl_data structure has been
grouped to union, so updated the dereferring of ioctl_data

Bug 5129765

Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Change-Id: I8732a1e86985643bb88f58de2b0b11a0d02ffe2b
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3323781
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Mahesh Patil <maheshp@nvidia.com>
2025-07-24 10:19:18 +00:00
Jon Hunter
a59a10dfeb drivers: Update timer APIs for Linux v6.15
In Linux v6.15, the timer APIs hrtimer_init() and del_timer() have been
removed. The hrtimer_setup() was added in Linux v6.13 to replace
hrtimer_init() and hrtimer_init() have finally been removed. The
functions del_timer()/del_timer_sync() were renamed to
timer_delete()/timer_delete_sync() in Linux v6.15. Use conftest to
detect these changes and update the drivers as necessary.

JIRA LINQPJ14-47

Change-Id: Id3994900384aad4b91155507cda91e04898ab12c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3336168
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:18 +00:00
Bhadram Varka
11843f9878 nvethernet: fix Tx-ring full issue
Issue: Below issue observed while running TCP_TX perf test
for longer duration.

nvethernet a808a10000.ethernet: [validate_ctx][1082][type:0x2][loga-0x84d2] dma_txrx: Invalid frame len
nvethernet a808a10000.ethernet mgbe0_0: Tx ring[0] is full
nvethernet a808a10000.ethernet mgbe0_0: Tx ring[0] is full
nvethernet a808910000.ethernet eqos_0: Tx ring[0] is full

This is a regression due to the below change -
https://git-master.nvidia.com/r/c/linux-nv-oot/+/3258684

The issue is that TSO packet is being treated as Non-TSO packet.
pskb_expand_head return code is returned directly where it can
return zero for TSO packet.

Fix:
Removed pskb_expand_head since headers are not getting updated in SW.
HW takes care performing the TSO handling. Also optimized the checks
in TSO path code.

Bug 5175569

Change-Id: I7f48ed32898fec51581bf034b953f0ef7a9913f0
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3322354
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
2025-07-24 10:19:17 +00:00
Bhadram Varka
1960558372 nvethernet: suspend/resume time profiling
Add suspend/resume time to the debugfs so that
tests can be written to monitor the SC7 KPI

Bug 4202840

Change-Id: I92531277ab7149269186f8c61237931de99a3368
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3300390
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
2025-07-24 10:19:16 +00:00
Bhadram Varka
b5a64188d3 nvethernet: don't free/alloc descriptors in SC7
- dma_alloc_coharent is taking more time while
allocating the descriptors in resume path.
- This change will not free the DMA descriptor
- It only free DMA buffers in the Rx ring while suspend
and re-allocate the DMA bufeers in the Rx ring during
resume.

Bug 5094704

Change-Id: If52471d11dd300c324a9c9bc1723fcb3d3e51bf7
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3313272
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
2025-07-24 10:19:16 +00:00
Bhadram Varka
3edc4ff927 nvethernet: Add nvidia,use-random-mac-addr DT property
Adding support for generating the random MAC address
if nvidia,use-random-mac-addr is set with value 1.

Below property should be there insider ethernet DT nodes -
nvidia,use-random-mac-addr = <1>;

Recommendation is to use only for MODS setup.
This should not be enabled in the production DT.

Bug 5142789

Change-Id: I87db90685bb9769358eda4edc226b929ccdce67f
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3317020
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Lovie Wang <loview@nvidia.com>
2025-07-24 10:19:16 +00:00
Sushil Kumar Singh
d3e47da5a4 nvethernet: disable HSI error reporting if EPL is disabled.
Issue:
During iperf test on pegasus board on customer observed below error periodically
nvethernet 6810000.ethernet: Failed to report error: reporter ID: 0x0, Error code: 0x1002, return: -19

Fix:
Disable HSI error reporting from hsi work queue function
for L4T platforms if safety component EPL is not supported.

Bug 4090612

Change-Id: Ifc51dd93fb16c1dbf7e42c648ca14443bb40550b
Signed-off-by: Sushil Kumar Singh <sushilkumars@nvidia.com>
(cherry picked from commit 983ddcae450c36cde9ec79433e16a4ed5aa89319)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3313872
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3318856
Tested-by: Wayne Wang (SW-TEGRA) <waywang@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:16 +00:00
Sanath Kumar Gampa
5193e86207 kernel-nvidia-oot: Restrict enabling MACSec in PHY
Restrict enabling MACSec support in below PHYs via MDIO

- MV-Q3244
- 88Q2221M

Jira NET-2795

Change-Id: I2cf767ad89762a5daa8ac29e753365af2e5d24fb
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3308513
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-by: Narayana Reddy P <narayanr@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:16 +00:00
Sanath Kumar Gampa
247613d6ce nvethernet: fix top-25 issues
Fixed below issues

-FORWARD_NULL
-CERT STR07-C
-CERT INT32-C
-CERT INT30-C
-CERT INT08-C
-CERT EXP39-C
-CERT EXP34-C

JIRA NET-2044

Change-Id: I839bd5aedff30c7e9679f513a2cf7a1fbe3b2b8a
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3258684
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Reviewed-by: Mohan Thadikamalla <mohant@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:16 +00:00
Mohan Thadikamalla
524e20def3 nvethernet: Add NvEthernetLinux ICD support
Add NvEthernetLinux Doxygen comments support
by documenting platform_driver,
net_device_ops, and ioctl command data.

Jira NET-2168

Change-Id: Ia8140290e4f01c00b6a5d310d8d64a8e0eb3b29c
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3291517
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2025-07-24 10:19:16 +00:00
Rakesh Goyal
84e2727119 nvethernet: support high pps
Issue: Ask for support PPS cmd feature for fast TSC-PTP lock

Fix: Extended the possible values for more pulse per sec

Bug 4585654
Bug 5042311

Change-Id: I8a2066cd39fdbacee3e8543712b449694aad9f6b
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3215592
Tested-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Reviewed-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:13 +00:00
Bibhay Ranjan
7d73a73146 nvethernet:set phy oldlink status correctly
Issue: on resume the mac set speed is not called due
to which the data transmissions are not happening in
alternate suspend resume cycles.

This is because the oldlink status is not set to 1 during
the successful resume, in set_speed_work_func retries

Fix: set oldlink to 1 once setspeed is successful in
function set_speed_work_func, so that next time
ether_adjust_link will call the set speed after resume

Bug 4891730

Change-Id: Iadb426f2cada99387ce180dfa2d0c9ee57e7ccd5
Signed-off-by: Bibhay Ranjan <bibhayr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3260342
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2025-07-24 10:19:13 +00:00
Narayan Reddy
442dd0068f nvethernet: deregister fixed link in remove
issue: PHY ID allocation is failing during the
stress test of insmod and rmmod of nvethernet
module, since PHYIDs were exhausing during the
module insertion.

fix: deregister fixed link in remove for
freeing up the PHYIDs which were allocated during
probe.

Bug 4754744

Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Change-Id: I6e71c684d4fcc5bb99a971c7d4d41726998cd8ec
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3245742
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mohan Thadikamalla <mohant@nvidia.com>
2025-07-24 10:19:10 +00:00
Nagaraj Annaiah
731489e015 Ethernet: Add Sysfs Support to test Tx and Rx bandwidth
Transmit: Add test_tx_bandwidth_dump_enable support to
transmit packets from the driver which helps measure
line rate for 25G and 10G.
pkt1500, pkt8192, pkt64 packet sizes can be configured.
Receive- Drop Packets at the driver level.

Bug 4742868

Change-Id: I52fe1b73b169dfedc06afea5fb62d7bc21fd9ba1
Signed-off-by: Nagaraj Annaiah <nannaiah@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3197198
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:10 +00:00
Mahesh Patil
a1291a7323 nvethernet: Set the mac clk rate in driver
1) Setting mac clk rate correctly in driver
2) Set speed correctly if phy_iface_mode set to USX-5G/USX-10G
3) Set the mgbe/eqos rx clocks during interface up

Bug 4874956
Bug 4872381
Bug 4745869

Change-Id: Ie3c39f44b713661e10a4fb20090c26d09667beea
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3216075
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: Michael Hsu <mhsu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:10 +00:00
Jon Hunter
f01227d4ea drivers: Drop inline from driver remove wrapper
The driver remove function is a function pointer and therefore, it does
not make sense to define the function as an 'inline'. Update the
coccinelle script and drivers to remove the inline statement.

Bug 4749580

Change-Id: Ia03691b75c4edffe609f27468b911a92a5ddbd68
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3233980
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:08 +00:00
Mahesh Patil
4a4aaf586f nvethernet: Set dma chan bit mask for MC/BC chan
Set the default MC/BC channel mask for packet duplicate

Bug 4844451

Change-Id: I9cfc6eb745dd3fedbf7220c77e30e79bcf91eeb8
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3209202
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:07 +00:00
Sanath Kumar Gampa
bba351803a nvethernet:Update CAR programming for MACSec
Issue: 1. Not able to launch supplicant on second VF
2. When launching supplicant on VF1, MACSec link on VF0 is getting lost

Fix: Do not program CAR registers as part of OSD as the same is being
taken care by Server and also do not register for MACSec interrupts.
Same is being handled in Server
2. Enabled packet duplication for MultiCast frames when launching
supplicant

Bug 4824402

Change-Id: I7b26298da8c94df2da823e36476bc37acf6123cd
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3201116
Reviewed-by: Mahesh Patil <maheshp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Nagaraj Annaiah <nannaiah@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2025-07-24 10:19:07 +00:00
Sanath Kumar Gampa
564d844a70 nvethernet:Fix the negative values in MACSec mmc
Bug 4802208

Change-Id: I4bd975efa4e2668597068910eccc7e98e23de822
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3187063
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Narayana Reddy P <narayanr@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2024-08-22 04:50:43 -07:00
Jon Hunter
951b2423a8 drivers: Fix platform_driver remove for Linux v6.11
In Linux v6.11, the 'platform_driver' structure 'remove' callback was
updated to return void instead of 'int'. Update all the impacted drivers
as necessary to fix this.

Bug 4749580

Change-Id: I3bb5c549777f7ccad0e3f870373fdd25726ad7ed
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3182878
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Tested-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-08-11 17:20:34 -07:00
Mahesh Patil
939e786e16 nvethernet: T264 Fix eqos clk and mgbe gbe mode
- Set eqos app clk speed as IAS for 1G speed
- Update mgbe speed correctly for gbe mode 25G in set speed retry

Bug 4713751

Change-Id: Iebdaecdb47193e6bb50b579223fc411d7b6939f7
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3187408
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Reviewed-by: Michael Hsu <mhsu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-08-08 05:00:34 -07:00
Jason Mei
6fea0b4122 nvethernet:Fix cbb error when ifconfig down
Issue:  CBB bus error when running ifconfig down
	on the nvethernet interface.

Fix:    All MDIO interfaces must be disabled
	before resetting the MAC. The MDIO was
	accessed by the MAC.

Bug 4714627

Change-Id: Ib75cfae70b13093cc574cd0cd07334cc03468ad7
Signed-off-by: Jason Mei <jianjunm@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3165268
(cherry picked from commit bd0a8befee)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3174678
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
2024-07-17 06:27:03 -07:00
Narayan Reddy
0bca2438be nvethernet:set clocks based on serdes speed
1) set eqos rx clock based on serdes speed
2) set mgbe app parent based on serdes speed

Bug 4713751

Change-Id: If776c84807f7aa0373e1106c218b60da51921e79
Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3166928
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
2024-07-08 15:55:49 -07:00
Revanth Kumar Uppala
19e5f2fafa nvethernet: macsec: Add module param for macsec.
Add module parameter to enable/disable macsec.

By default macsec will be enabled and it can be disabled
with help of module parameter "macsec_enable"

Bug 4640382

Change-Id: I3b6ffde52a73760cd65f02abe472c3133996b698
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3156387
(cherry picked from commit f870a5f9fc)
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3138588
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-06-29 08:15:41 -07:00
Mahesh Patil
00e9f705d4 nvethernet: Ignore lane bringup restart task
- Adding WAR to ignore lane bringup restart task
 as it is causing lane bring up failures in SLT EQOS/MGBE
- Populate RSS hash table with enabled num_of_dma channels

Bug 4709627

Change-Id: I195db0371f69dfcedc1c67023c1279af426dd7e6
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3162313
Reviewed-by: Nagaraj Annaiah <nannaiah@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2024-06-26 22:56:52 -07:00
Mahesh Patil
c765f98235 nvethernet: T26x EQOS changes
1) Added T26X EQOS bring up changes
2) Fixes added during bring up

Bug 4639097

Change-Id: I624fc5c2f9ef4304fe2ae1df6905195d7d969c68
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3152935
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-by: Narayana Reddy P <narayanr@nvidia.com>
2024-06-18 11:37:23 -07:00
Mahesh Patil
6bc9570126 nvethernet: T26x CAR changes
Ported from -
https://git-master.nvidia.com/r/c/nvethernet-docs/+/3126090

Bug 4228185

Change-Id: I74b0607de28b9a635afeae80dbc31cb79bd45f30
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>

fix compilation error

Change-Id: I088609c66a180aeacf8baeb9dad0d29a38550726
2024-06-07 13:10:54 +00:00
Mahesh Patil
54ca566b6a nvethernet:add idle timer window interrupt support
Ported from -
https://git-master.nvidia.com/r/c/nvethernet-docs/+/2963539

Bug 4246781

Change-Id: I683dd14ffbc92755c60f04ba35e5e5bfe98c5a0f
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
2024-06-07 13:10:54 +00:00
Rakesh Goyal
eb29db2879 nvethernet: ptp support for upcoming chip
Bug 4221043

Change-Id: I4689259e48705aa975ec33dddaba8fd7e941d304
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/nvethernet-docs/+/2968051
Tested-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2024-06-07 13:10:54 +00:00
Nagaraj Annaiah
a0d0c09294 osd: Add FRP and L2 support for t264
Ported from -
https://git-master.nvidia.com/r/c/nvethernet-docs/+/3004699

Bug 4334269

Change-Id: I66d2071e8ead23b99657590f731e3584653ea2b3
2024-06-07 13:10:54 +00:00
Rakesh Goyal
4cd40b0b3b nvethernet: T26X MAC_Address0_High reg AE bit
In T26X, MAC_Address0_High reg AE bit R/W, so changing
UC and BC address indexing to 0 and 1.

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

Bug 4325242

Change-Id: Id2e6d757ceee750a31bf1fdf3821bc5dd892f08b
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com>
2024-06-07 13:10:54 +00:00
Mahesh Patil
501aeb6edc nvethernet: Macsec Bring up on T264
Ported from -
https://git-master.nvidia.com/r/c/nvethernet-docs/+/2904856

Bug 4122114

Change-Id: I3be0d8c545f4edac678f5444044aa5ccd54b08fe
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
2024-06-07 13:10:54 +00:00
Mahesh Patil
90a31dac49 nvethernet: 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/linux-nv-oot/+/3148383

Bug 4291865

Change-Id: Ic3df0db74dc86bebcacff2f77238f1a6bcf38657
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
2024-06-07 13:10:54 +00:00
Mahesh Patil
0e5f26d308 nvethernet: Enable RSS feature for T264
Ported from -
https://git-master.nvidia.com/r/c/nvethernet-docs/+/2981671

Bug 4291539

Change-Id: I9568635d04d9198a073e2c6758953a16ba408cb4
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
2024-06-07 13:10:54 +00:00
Mahesh Patil
2a77d85ced nvethernet: Remove Rx channel0 WAR fix
MGBE NET07 bit file fixes Rx Channel 0 data
tranfer not working issue. Removing WAR fix

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

Bug 4182455

Change-Id: I0774dc47eee15246989dfbd8c09f0bc001b2a15c
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
2024-06-07 13:10:54 +00:00
Mahesh Patil
5edac49a28 nvethernet: T264 Enable 20 VDMA channel support
Ported from -
https://git-master.nvidia.com/r/c/nvethernet-docs/+/2940794

Bug 4043836

Change-Id: I763bfdaa78082de035219e10ef1c131bdbba5e35
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
2024-06-07 13:10:54 +00:00
Rakesh Goyal
2a104ca84d nvethernet: T264 VDMA feature and initial bring up
Bug 4043836

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

Change-Id: I844112cc71e387f6ae04c2cc7f64b71abb4283fd
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3149289
Tested-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Reviewed-by: Michael Hsu <mhsu@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Tested-by: Bhadram Varka <vbhadram@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-06-05 02:51:08 -07:00
Srinivas Ramachandran
70999e5756 nvethernet: Enable Rx csum offload only for EQOS
Issue: Rx csum offload can be safely enabled
       for EQOS as there is reliable HW sequence to
       ensure data validity when processing descriptors
       which are SW owned.
Fix:   Enable Rxcsum for eqos.

Bug 4486046

Change-Id: Ic3ef7317cfc9d22c0756afc6dfc9f98ce6743977
Signed-off-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3126197
(cherry picked from commit 7e908f2f0bce0650b21c64fddb31401f190c26df)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3146940
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Tested-by: Hareesh Kesireddy <hkesireddy@nvidia.com>
Reviewed-by: Hareesh Kesireddy <hkesireddy@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Amlan Kundu <akundu@nvidia.com>
2024-05-31 02:18:48 -07:00
Hareesh
53fafd9cd9 nvethernet: eqos: suppress set speed failed spew
- Suppressed set speed failed print for eqos as print
  is added in ethernet server.

Bug 4382126

Change-Id: Iaf58b6fcb66ba74185d3098a0954fb12cb915fb3
Signed-off-by: Hareesh <hkesireddy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3086295
(cherry picked from commit 3a48e73a8bb74cadb5f711f62880526101a3f56e)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3132851
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-05-15 14:15:24 -07:00