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>
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>
Existing implementation uses a single page_pool
for all Rx DMA channels. As by default all irqs
are on CPU 0, this does not cause any issue.
Routing an irq to some other CPU causes race
conditon for page allocation from page_pool which
leads to random memory corruption.
[ 158.416637] Call trace:
[ 158.416644] arm_lpae_map_pages+0xb4/0x1e0
[ 158.416649] arm_smmu_map_pages+0x8c/0x160
[ 158.416661] __iommu_map+0xf8/0x2b0
[ 158.416677] iommu_map_atomic+0x58/0xb0
[ 158.416683] __iommu_dma_map+0xac/0x150
[ 158.416687] iommu_dma_map_page+0xf4/0x220
[ 158.416690] dma_map_page_attrs+0x1e8/0x260
[ 158.416727] page_pool_dma_map+0x48/0xd0
[ 158.416750] __page_pool_alloc_pages_slow+0xc4/0x390
[ 158.416757] page_pool_alloc_pages+0x64/0x90
[ 158.416762] ether_padctrl_mii_rx_pins+0x164/0x9d0 [nvethernet]
[ 158.416807] ether_padctrl_mii_rx_pins+0x478/0x9d0 [nvethernet]
[ 158.416822] osi_process_rx_completions+0x284/0x4d0 [nvethernet]
[ 158.416832] 0xffffa26218b8f71c
[ 158.416855] __napi_poll+0x48/0x230
[ 158.416871] net_rx_action+0xf4/0x290
[ 158.416875] __do_softirq+0x130/0x3e8
[ 158.416889] __irq_exit_rcu+0xe8/0x110
This change creates a page_pool per Rx DMA channel.
This ensures there is no race conditon for page
alloc/dealloc from each DMA napi context.
Bug 4541158
Change-Id: I12668ee7d824fd30d54a874bbbdf190d02943478
Signed-off-by: Aniruddha Paul <anpaul@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3091494
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
In Linux v6.6, the header net/page_pool.h was split into two headers;
net/page_pool/helper.h and net/page_pool/types.h. Use the conftest
script to detect which of these headers are present and generate compile
time definitions for including the appropriate headers.
Bug 4346767
Change-Id: I389ce5b867a1efd867b8392bb21383784c1b4af6
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3026553
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Issue: Restarting of PTP daemon updates
the current system time in MAC registers.
Fix: Configure PTP registers only if PTP daemon
sends updated configuration. If the configuration
is same continue with earlier registers update.
System time will be set in the MAC registers at
the time of ptp_early_init and the 1st ptp
daemon ioctl to set HW configuration.
Bug 4259584
Change-Id: Ied0eec498cfd4283b71797abf3b272d19998064f
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2994409
(cherry picked from commit e774e69777d92a7136ec6c61571e677bfbde6ebf)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3010369
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Split the type and declaration of page_pool header for Linux6.6
based on below change from kernel 6.6:
---
commit a9ca9f9ceff382b58b488248f0c0da9e157f5d06
Author: Yunsheng Lin <linyunsheng@huawei.com>
Date: Fri Aug 4 20:05:24 2023 +0200
page_pool: split types and declarations from page_pool.h
---
Bug 4346767
Change-Id: I0217da34c67d952c97c6812c2760bed2fb3df3e0
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3008090
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
1.There is a switch-case where one case is falling to the
next case. This is creating the compilation warning.
Make this fall through as intentional by adding
compiler attribute as "fallthrough".
2.Remove redefinition of macro MII_ADDR_C45
Bug 4055275
Change-Id: I99193b225e97c414588bb306cb48e472ae079f9f
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2882027
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Issue:
1) dev_queue_xmit acquired the per queue tx lock and called driver
transmit routine.
2) During the transmit - common interrupt asserted which tries to
acquire the same tx lock which resulted in lock recursion.
Fix: Move the lock acquire to tasklet context under common isr.
Bug 3773016
Change-Id: I7cfd49beb1238286d3bccd9e4b9ccc054c4f6d30
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2770227
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Issue: In the current scenrio, when the remote
interface is brought down and up. There is no way
of getting the link up again with the remote device
which in turn fails the data transfers even though
interface from other end is brought up.
Fix: When interface is gone down on the other side,
MAC receives local faults and in this scenario
no data should be sent to MAC, so disable network
queues and initiate the lane bring up process for
monitoring the link status. Once the link is up,
re enable the network queues for data transfers.
Also added support for enabling driver logs using
msglvl of ethtool
Bug 3744088
Bug 3654543
Bug 3665378
Change-Id: I16cdee74e4e3ff6cd176924575f5005f385d4c5d
Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2730876
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
GVS: Gerrit_Virtual_Submit
Issue: Observed Tx timestamp timeout from application since
workqueue is not getting scheduled at the driver layer to consume
the Tx timestamp from the OSI layer which resulted in tx_timeout
from APP layer.
Fix: Invoke the timestamp consume function in tx done instead
of scheduling through workqueue. Schedule the work queue only
if the timestamp is not found.
Bug 3658701
Change-Id: If97aebc1980f685e3cc34f135ace91298ee78657
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2732444
Reviewed-by: Troy Kong <troyk@nvidia.com>
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Tested-by: Troy Kong <troyk@nvidia.com>
GVS: Gerrit_Virtual_Submit
Issue:
OSD Driver maintains a local MC address list to avoid the programming
old addresses again into HW when new MC address list passed from the
network stack.
Its observed MC address index for a specific address is different once a
MC address deleted from the list. Because of this new MC address which
is passed in new list is overwriting the old MC address.
Fix:
Program the entire list every time when network stack passes it instead
of maintaining local list at driver.
Bug 3609583
Change-Id: I97cb3ea4d35641ad156d16c54c89e8593ad64459
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2702851
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: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
GVS: Gerrit_Virtual_Submit
1) Add threaded interrupt handler function to call EPL API
to report error.
2) add hsi_enable sysfs interface to enable HSI feature at runtime
to enable:
echo enable > /sys/devices/platform/./nvethernet/hsi_enable
to disable:
echo disable > /sys/devices/platform/./nvethernet/hsi_enable
3) For mac RX CRC and checksum error, error reporting frequency is
every one second for HSI_ERROR_THRESHOLD error count
4) Added DT property “nvidia,hsi_err_time_threshold” to specify time
threshold for error reporting
5) Added DT property "nvidia,hsi_err_count_threshold" to specify
error count threshold for error reporting
Bug 3543410
Change-Id: I73ef1a674a846295e02deff7e07954e8dada9792
Signed-off-by: Om Prakash Singh <omp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2675040
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
GVS: Gerrit_Virtual_Submit
Issue: Adjust link from the phy subsystem can be called
multiple times either with link down or up. If its called
second time with same link down then code tries to disable
the same clks again which results in clock warinigs.
Fix: Maintain the state of the clk and then disable/enable
the clock based on the state.
Bug 3585098
Change-Id: I7d259e6066c7b67d0a970122eb0841e4b5871b43
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2688290
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Issue:
- Workqueue for Tx timestamp is running without
delay, use many CPU cycle at hard isr thread
priority.
- Incorrect return value from ether_handle_tso()
Fix:
- Update code to use delayed workqueue
- Return correct value
Bug 200780891
Bug 3400623
Change-Id: I2095a0634e079bf870ef87cd2de1d35fe24bafd4
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2610986
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>