nannaiah
2fcef2bf75
nvethernet: Add to read PTP registers from DMA base.
...
Issue: Virtualization introduces read delay due to trap
mechanism.
Fix:
Move time critical PTP timestamp registers to use alternate
HW MMIO window/page that is not trapped to read PTP timestamp
registers.
Bug 2694285
Change-Id: I52340ae1f136a1a921b9c4a669c398e5d23ded73
Signed-off-by: Nagaraj Annaiah <nannaiah@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2360103
(cherry picked from commit e2ad2ff5b43532c2d5f9165f0311c59f1c6e9a4c)
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2347314
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: Gaurav Asati <gasati@nvidia.com >
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com >
Reviewed-by: Krishna Thota <kthota@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: Gaurav Asati <gasati@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-02-21 16:31:59 +05:30
Mohan Thadikamalla
f0478be2c9
nvethernetrm: MISRA fixes for QNX PLC
...
Issue:
Observed three MISRA/CERT-C issue with
QNX PLC configuration.
Fix:
Fix observed MISRA issues.
Bug 200624259
Change-Id: Iafd0f2694b4506bee12b15f899cf2201cad92925
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2368010
(cherry picked from commit 61310ea022e525d88d9d9def8eebee2b96770e27)
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2375768
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Gaurav Asati <gasati@nvidia.com >
Reviewed-by: Ashutosh Jha <ajha@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2024-02-21 16:31:59 +05:30
Nagarjuna Kristam
4dc2836b11
osi: dma: Add support to read PTP time over DMA base
...
Issue: RFE to support PTP time read from OSI DMA.
Fix: Add OSI DMA API to read PTP time from DMA base.
Move PTP time read code to OSI common.
Bug 200630996
Change-Id: Ic65a042d23318f93ecf23b481ab7a898cf88d360
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2367295
(cherry picked from commit 7379669ef23507e0f50f1517e819c552ea359300)
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2374403
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: Gaurav Asati <gasati@nvidia.com >
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-02-21 16:31:59 +05:30
Srinivas Ramachandran
a89ce48ab2
nvethernetrm: Indicate more Rx frames pending
...
Issue: The function osi_process_rx_completions does
not provide indication whether there are more
Rx frames in the HW ring to be processed by SW.
This indication is needed in OSD layers like
AUTOSAR MCAL driver as per the spec.
Fix: Check the next descriptor in the ring and indicate
if it has a valid new Rx packet that is pending
to be processed.
Bug 3019362
Change-Id: I4b4b8ac7b741dedbe979156e44f442cbb0e67590
Signed-off-by: Srinivas Ramachandran <srinivasra@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2361176
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com >
Reviewed-by: Mahesh Patil <maheshp@nvidia.com >
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: Ashutosh Jha <ajha@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: Mahesh Patil <maheshp@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2024-02-21 16:31:59 +05:30
rakesh goyal
077f63621d
nvethernetrm: eqos: handle filter operation flag
...
Issue: RM server is not aware of what L2 address
should be removed from local list and register as
index passed by OSD/OSI_Core may mis-match in case
multi FD instance usecase.
Fix: As RM server finds index/offset on its own corresponding
to MAC address, Core software should reset AE bit and pass
other user provided argument as it is. Legacy
way of removing L2 address is still supported.
Bug 200626200
Change-Id: I43919827422d176334198ee09e822047b606da79
Signed-off-by: rakesh goyal <rgoyal@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2359969
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com >
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-02-21 16:31:59 +05:30
rakesh goyal
0118473454
nvethernetrm: osi private structure update
...
update OSI HW feature registers
Bug 200563382
Change-Id: Ia30176bcf9dc1080489caa52bd0c67ac05a17ef1
Signed-off-by: rakesh goyal <rgoyal@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2338042
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: Bitan Biswas <bbiswas@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2024-02-21 16:31:59 +05:30
Nagarjuna Kristam
9f4bff9f10
osi: dma: Add callback for osd data path
...
Issue:
When 2 OSD's are part of single compilation process, only one
OSD can be linked at compile time. This causes issues in handling
TX and RX communication from OSI to OSD.
Fix:
Add callbacks for TX and RX communication which can be registered by
OSD to receive callback communication from OSI for TX and RX. Use
existing API's if OSD doesn't register a callback.
Bug 200603660
Change-Id: I0b246a78a3d1bc4bb690e1ad7dac82108500b625
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2343967
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-02-21 16:31:59 +05:30
Mahesh Patil
693cefdcc7
nvethernetrm: Check Rx packets processed or not
...
Issue: If buffer allocation fails in Rx refill, cur_rx_idx overlaps
and can result in crash in osi_process_rx_completions()
Fix: Track Rx packet processed or not. If pkt is already processed
skip further rx packet processing in osi_process_rx_completions()
Bug 2945319
Change-Id: Ieaed3aadf3d29aaa0e9d29d074f1f0f54f77e620
Signed-off-by: Mahesh Patil <maheshp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2338920
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: Automatic_Commit_Validation_User
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 >
Reviewed-by: Ajay Gupta <ajayg@nvidia.com >
Reviewed-by: Ashutosh Jha <ajha@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2024-02-21 16:31:59 +05:30
Nagarjuna Kritam
33ccc2f87d
nvethernetrm: Use SSINC for SSIR and ADDEND calculations
...
Use MAC version based SSINC value and use it to configure SSIR
and addend registers.
Bug 200605211
Change-Id: I8ac4e5fbfb9c64db35a3c33417dee5ca34a1c61d
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2341203
Reviewed-by: automaticguardword <automaticguardword@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: Rakesh Goyal <rgoyal@nvidia.com >
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com >
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-02-21 16:31:59 +05:30
Bhadram Varka
e8dcbc4286
nvethernetrm: add support for EQOS VM interrupts
...
Adds VM IRQ handling support at OSI layer and adds
corresponding support for EQOS as well.
Need to pass below parameters from DT -
o Number of VM IRQ's assigned per OS/VM.
o Number of VM channels assigned to a VM IRQ.
o List of DMA channels assigned to a VM IRQ.
Below is the sample DT representation -
vm_irq_config: vm-irq-config {
nvidia,num-vm-irqs = <4>;
vm_irq1 {
nvidia,num-vm-channels = <2>;
nvidia,vm-channels = <0 1>;
};
vm_irq2 {
nvidia,num-vm-channels = <2>;
nvidia,vm-channels = <2 3>;
};
vm_irq3 {
nvidia,num-vm-channels = <2>;
nvidia,vm-channels = <4 5>;
};
vm_irq4 {
nvidia,num-vm-channels = <2>;
nvidia,vm-channels = <6 7>;
};
};
ethernet@<base_addr> {
[...]
nvidia,vm-irq-config = <&vm_irq_config>;
[...]
}
Bug 200546379
Change-Id: Id20780d573aa70baf42b003728ba416ed61832d2
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2250403
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2198595
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-02-21 16:31:59 +05:30
Bhadram Varka
c43f5516ab
nvethernetrm: eqos: add Software reset for VDK
...
Bug 200546379
Change-Id: I40cf003311926e6b0a1685c0443d64ccf59c5325
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2270371
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2274311
Reviewed-by: automaticguardword <automaticguardword@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: Rakesh Goyal <rgoyal@nvidia.com >
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2024-02-21 16:31:59 +05:30
Nagarjuna Kristam
84fe6fd864
osi: dma: Add flags for rx checksum.
...
Issue:
- Current values for checksum flags are too
generic for QNX requirements.
Fix:
- Add specific flags for TCP/UDP, IP v4/v6
- Update value for OSI_CHECKSUM_UNNECESSARY
to use it as a flag instead of value.
Bug 200610815
Change-Id: I7ce266594cb5bb5b1bd86ff9ab28a89d778146c1
Signed-off-by: Gaurav Asati <gasati@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2331560
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-02-21 16:31:59 +05:30
Nagarjuna Kristam
8a0eadf28e
osi: dma: Add TX SWCX flags for IP checksum
...
Issue:
In QNX OS, some data packets needs only IP checksum to be enabled.
Fix info:
Add a TX SWCX flag to update IP checksum bit to DMA descriptor.
Bug 200603660
Change-Id: I1dd6b0a0a4e8da7af548fd7640912fc3248c4da5
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2327717
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-02-21 16:31:59 +05:30
Nagarjuna Kristam
fd75eca314
osi: dma: Add TX SWCX flags for payload length
...
Issue:
In QNX OS, IP packets are split and sent to ethernet driver. This
requires packet length update needed in DMA descriptor.
Fix info:
Add a TX SWCX flag to update payload length to DMA descriptor.
Bug 200603660
Change-Id: I3a6a2fb96d645d6ccf5c0e616ded220ed7742bc9
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2323286
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-02-21 16:31:59 +05:30
nannaiah
ab79f87190
nvethernetrm: Add flag for virtualization & stats
...
Issue:
When virtualization is enabled and registers are accessed during
UDP line rate transfer or receive then spurious common interrupts
gets generated for buffer unavailable which hangs the ethernet server.
Fix:
1. Add Flag which decides virtualization is enabled(1) or
disabled(0)
2. If virtualization is enabled then disable receive and transmit
buffer Unavailable interrupts.
Bug 2694285
Change-Id: I2c65b724c15abf5d4f0101d96b067ad9f4f3d99e
Signed-off-by: Nagaraj Annaiah <nannaiah@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2330034
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: Automatic_Commit_Validation_User
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: Ashutosh Jha <ajha@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-02-21 16:31:59 +05:30
rakesh goyal
2f304877f1
nvethernetrm: add osi_likely() and osi_unlikely()
...
Adding osi_unlikely and osi_likely using compiler
built-in macros which give compiler hints for branch
prediction.
Bug 200599872
Change-Id: I64be9a53285bdc11015a2efb565e2addac531c5c
Signed-off-by: rakesh goyal <rgoyal@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2318771
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com >
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Narayan Reddy <narayanr@nvidia.com >
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-02-21 16:31:59 +05:30
Praveen Mallaiah
b64e20730b
nvethernet: updated osd function documentation
...
Updated osd_transmit_complete, osd_receive_packet
algorithm documentation
Bug 200574645
Bug 2855341
Bug 200598869
Change-Id: I1ab0f21cc39b39bf755b4ea19703b2875279c77a
Signed-off-by: Praveen Mallaiah <pmallaiah@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2320522
(cherry picked from commit 50490d3bfc12089a3e1ee2d82d9c6729b9b5d853)
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2317409
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: Sandeep Trasi <strasi@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2024-02-21 16:31:59 +05:30
Mohan Thadikamalla
58572a09b8
nvethernetrm: Remove core_backup static variable
...
- Define core_backup structure in osi_core file
and convert osi_core_private_data structure backup_config
variable as core_backup type.
- Remove the global eqos_core_backup_config static variable.
Bug 200596517
Change-Id: Ice38e1a8724c1da722eda7eb4e63e79674b27b0d
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2315795
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bitan Biswas <bbiswas@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: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2024-02-21 16:31:59 +05:30
Mohan Thadikamalla
9bea280035
Revert "nvethernetrm: move core_backup to osi_common.h"
...
Reverting this change to support IP based
indirect addressing registers save and restore.
Bug 200596517
Bug 2804631
This reverts commit 962ca78215 .
Change-Id: Ia6ec230243cfb58a64e4f9fc4dbb9e3079a58cae
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2315794
Reviewed-by: automaticguardword <automaticguardword@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: Bhadram Varka <vbhadram@nvidia.com >
Reviewed-by: Narayan Reddy <narayanr@nvidia.com >
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2024-02-21 16:31:59 +05:30
Mahesh Patil
8a805c546f
nvethernetrm: Program LPI 1us tic counter register
...
Issue: In GVS farm, SSH logging fails randomly
after enabling EEE feature
Fix: Program LPI 1usec tic counter register with correct
APB clock(clk_pclk) frequency as per databook requirement.
Bug 2813867
Bug 2850086
Change-Id: Ice2e130a808e763841945cb7a2d4e3552ee31498
Signed-off-by: Mahesh Patil <maheshp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2300343
Reviewed-by: automaticguardword <automaticguardword@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: Ajay Gupta <ajayg@nvidia.com >
Reviewed-by: Ashutosh Jha <ajha@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2024-02-21 16:31:59 +05:30
narayanr
8e7a09a4a8
nvethernetrm: drop rx packets longer than current MTU
...
Issue: When JE is set, HW will accept any valid packet on Rx
upto 9K or 16K (depending on GPSCLE bit), irrespective of
whether MTU set is lower than these specific values. When
Rx buf len is allocated to be exactly same as MTU, HW will
consume more than 1 Rx desc to place the larger packet.
Fix: Drop Rx packets which are longer than currently set
MTU since HW cannot drop them.
Bug 2870545
Signed-off-by: narayanr <narayanr@nvidia.com >
Change-Id: I869f4858f8d2b502a3965dc2ca40cda8805f9886
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2308379
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-02-21 16:31:59 +05:30
rakesh goyal
26dac73854
nvethernetrm: add counter for pkt_err stats cleared
...
Add counter for how many times pkt_err stats got cleared
using osi_clear_tx_pkt_err_stats and
osi_clear_rx_pkt_err_stats call.
Bug 200548007
Change-Id: I19b796131ac6bb43a52aad9bc3211426da4fe4ae
Signed-off-by: rakesh goyal <rgoyal@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2304567
Tested-by: mobile promotions <svcmobile_promotions@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 >
Reviewed-by: Ashutosh Jha <ajha@nvidia.com >
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2024-02-21 16:31:59 +05:30
narayanr
173f516672
nveternetrm: fix doxygen comments
...
Bug 2804631
Bug 2804169
Bug 200561709
Change-Id: I6d61c8b8a911ae3847049c534e6d19e0aec65209
Signed-off-by: narayanr <narayanr@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2306568
Tested-by: mobile promotions <svcmobile_promotions@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: Automatic_Commit_Validation_User
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com >
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2024-02-21 16:31:59 +05:30
narayanr
8b89217184
nvethernetrm: enable GPSLCE
...
Enable Gaint Packet Size Limit Control when
MTU size is greater than 9000
Bug 200512422
Change-Id: I458b561298760cbb4945195a86daed43ba69d1c6
Signed-off-by: narayanr <narayanr@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2303736
Tested-by: mobile promotions <svcmobile_promotions@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: Automatic_Commit_Validation_User
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com >
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com >
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2024-02-21 16:31:59 +05:30
Mahesh Patil
b993a0368d
nvethernetrm: move core_backup to osi_common.h
...
Issue: RFE: move struct core_backup to osi_common.h
Fix:
1. Moved core_backup to osi_common.h
2. Added generic osi_mac_restore_registers() and osi_mac_save_registers()
Api's in osi_common.c
Bug 2804631
Change-Id: I5bc71666e104f2e729024e096bd51ce350f2a1f0
Signed-off-by: Mahesh Patil <maheshp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2286642
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: Ajay Gupta <ajayg@nvidia.com >
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com >
Reviewed-by: Ashutosh Jha <ajha@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-02-21 16:31:59 +05:30
Bhadram Varka
198951cc39
nvethernetrm: Add MMC counters
...
Adds MMC counters for which hold higher values.
Bug 200565915
Change-Id: I8803a60d97b0235911df177f820b8c66cfb0b1bb
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2292221
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com >
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com >
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-02-21 16:31:59 +05:30
Mahesh Patil
f0aded357d
nvethernetrm: Add const to unmodfied arguments
...
Issue: Avoid accidental modification of func call arguments in OSI layer
Fix: Add const keyword to func parameter unmodified by OSI layer
Bug 2715405
Change-Id: I6fc60c5e2b52e638f3dd6acc1f065622ead4b658
Signed-off-by: Mahesh Patil <maheshp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2234454
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: Automatic_Commit_Validation_User
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: Ajay Gupta <ajayg@nvidia.com >
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com >
Reviewed-by: Ashutosh Jha <ajha@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2024-02-21 16:31:59 +05:30
Mohan Thadikamalla
35e6430484
nvethernetrm: Add PHY MDIO read/write callbacks
...
Adds support for MDIO read/write callbacks and
moves EQOS specific code from OSI layer to EQOS layer.
Bug 200565891
Change-Id: I44d875ab88d8802266954c6d6362a795d22e89bb
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com >
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2223424
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
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: Bitan Biswas <bbiswas@nvidia.com >
Reviewed-by: Bibek Basu <bbasu@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2024-02-21 16:31:59 +05:30
narayanr
cc6d175a49
nvethernetrm: fix doxygen comments
...
Bug 200577839
Bug 200580977
Change-Id: I99e93a2b216f57e1877418ce4fe1d89088a618fe
Signed-off-by: narayanr <narayanr@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2277959
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 >
GVS: Gerrit_Virtual_Submit
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-02-21 16:31:59 +05:30
Srinivas Ramachandran
2df2d68dce
nvethernetrm: Add API to backup/restore registers
...
Issue: During SOC suspend, the MAC is placed in reset.
This causes all dynamic configurations done by
SW on the MAC core registers is lost. When SOC
resumes, MAC is initialized to power-on-default
configuration, while other SW components still
have previously set configuration. This results
in mismatch between HW/SW configuration.
Fix: Add APIs osi_save_registers(), osi_restore_registers()
to backup and restore the MAC core configuration
registers before suspend and after resume respectively.
Bug 200561046
Change-Id: I6d7b39d39a6f3fa882cfd905bc49a5850163ea4c
Signed-off-by: Srinivas Ramachandran <srinivasra@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2267390
Reviewed-by: Narayan Reddy <narayanr@nvidia.com >
Tested-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: Bitan Biswas <bbiswas@nvidia.com >
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-02-21 16:31:59 +05:30
Srinivas Ramachandran
bba8383678
nvethernetrm: Honor budget for processing tx completions
...
Issue: osi_process_tx_completions is run in the BH for
processing Tx done irq. This function always loops
till the Tx status for all packets that are Tx'd so
far is processed.
1) The NAPI budget for this Tx completions handler is
not honored.
2) The variable 'processed' is expected to keep track
of Tx'd packets. Currently it is counting Tx'd descriptors.
There can be multiple Tx descriptors consumed for one packet.
Fix: 1) Add budget parameter to osi_process_tx_completions() API.
2) Break out of loop in this API if packets to process
exceeds budget
3) Increment the processed count variable only after checking
last descriptor for a packet.
Bug 2756439
Change-Id: Id538343f6853881ea41109b8b46c8d0e82dce98a
Signed-off-by: Srinivas Ramachandran <srinivasra@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2237822
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: Praveen Mallaiah <pmallaiah@nvidia.com >
Tested-by: Praveen Mallaiah <pmallaiah@nvidia.com >
Reviewed-by: Narayan Reddy <narayanr@nvidia.com >
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-02-21 16:31:59 +05:30
Mahesh Patil
525bc02acf
nvethernetrm: Rename functions to match close functionality
...
Issue: rename functions to match close functionality
Fix:
1) Renamed osi_poll_for_swr() to osi_poll_for_mac_reset_complete()
2) Renamed adjust_systime() to adjust_mactime()
3) Renamed eqos_adjust_systime() to eqos_adjust_mactime()
3) Updated ether_adjust_time() description
Bug 2715276
Change-Id: I6c86b6f8e0b50607acbaaf9689757dcfc683a75d
Signed-off-by: Mahesh Patil <maheshp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2209751
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-02-21 16:31:59 +05:30
Narayan Reddy
062fadbdcf
nvethernetrm: add rx error stats
...
add rx frame error stats
Bug 200561724
Change-Id: I284fde9c26559627832f6df5c059a9e201e967ec
Signed-off-by: Narayan Reddy <narayanr@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2229248
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-02-21 16:31:59 +05:30
Srinivas Ramachandran
d68e158596
nvethernetrm: Add support for EEE LPI
...
Add an API to configure the EEE LPI mode.
Tx LPI is enabled with a default entry time of 1sec.
The MAC controller has capability to automatically
enter LPI mode when all transmissions are complete.
Bug 2594864
Change-Id: I765ddfda908b1922abd46c11fa217a35fe6190f1
Signed-off-by: Srinivas Ramachandran <srinivasra@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2160787
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-02-21 16:31:59 +05:30
Ajay Gupta
62753951de
nvethernetrm: enable tx interrupt coalescing
...
Tx frame count and software timer based interrupt coalescing
is enabled. Tx frame based coalescing can be enabled only
when tx software timer based interrupt coalescing is also
enabled.
Bug 200529168
Change-Id: Icd5e2ff3a6b9ad1d1793842b607a93ad779955d7
Signed-off-by: Ajay Gupta <ajayg@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2234609
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 >
GVS: Gerrit_Virtual_Submit
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com >
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com >
Reviewed-by: Ashutosh Jha <ajha@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-02-21 16:31:59 +05:30
Ajay Gupta
d722948b93
nvethernetrm: enable rx frame based interrupt coalescing
...
Rx frame based coalescing can be enabled only when
Rx timer based coalescing is also enabled. This is to avoid
no rx interrupt issue for applications which send only limited
frames and expects reply.
Bug 200529168
Change-Id: If20ec8322d6597f0a018c5668a9d632e456f60cd
Signed-off-by: Ajay Gupta <ajayg@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2233501
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 >
GVS: Gerrit_Virtual_Submit
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com >
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com >
Reviewed-by: Ashutosh Jha <ajha@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-02-21 16:31:59 +05:30
Ajay Gupta
d7ecf48908
nvethernetrm: fix AXI clock to 125MHz
...
Fixes incorrect number of rx interrupt triggered with
rx coalescing (rx-usecs in ethtool) parameter.
Bug 200529168
Change-Id: I49ea2c469667e05f7e12f2741984f609127f395c
Signed-off-by: Ajay Gupta <ajayg@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2229564
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com >
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Narayan Reddy <narayanr@nvidia.com >
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com >
GVS: Gerrit_Virtual_Submit
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com >
Reviewed-by: Ashutosh Jha <ajha@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-02-21 16:31:59 +05:30
Narayan Reddy
a7d1fada19
nvethernetrm: change required clock freq to 250MHz
...
increase required clock frequency from 62.5MHz to 250MHz
for better PTP time stamping accuracy.Switching to 250 MHz
will increase the accuracy of the PTP timestamp by ~22ns
Bug 200565215
Change-Id: I1dab385ade30df4864c1477685f39d4374700932
Signed-off-by: Narayan Reddy <narayanr@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2234039
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-02-21 16:31:59 +05:30
Mohan Thadikamalla
e2c9e7e3cb
nvethernetrm: Add slot function support
...
Issue:
Data packets sent via EQOS hardware are not
following any packet gaping. The AVB use-cases
have different timing requirements for class A
data packets. For example, the time difference
between two class A data packets are supposed
to be 125 microseconds for audio data of
frequency 48 kHz.
Fix:
Add slot function support to schedule
the data fetching from the system memory
by the DMA. This will help the AVB SW stack
timing requirements for class A data.
Bug 200545374
Change-Id: Id7c606f7491a423051667811bd6d459ee58f6700
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2222282
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: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com >
Reviewed-by: Krishna Thota <kthota@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-02-21 16:31:59 +05:30
Srinivas Ramachandran
5faa6bc5bd
nvethernetrm: Remove APIs that micro-manage the controller
...
Issue: APIs like osi_clear_tx/rx_intr, osi_update_rx_tailptr
are redundant. The operations that are done in these
functions can be included as part of other existing
OSD-OSI interface API. OSD need not micro-manage the
hardware controller by using such fine grain APIs.
Fix: Remove the redundant APIs and implement their functionality
as part of existing APIs.
Bug 2715391
Change-Id: I47851c204988475cac1cadf6fe678d7d446a3cc3
Signed-off-by: Srinivas Ramachandran <srinivasra@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2211093
Reviewed-by: Narayan Reddy <narayanr@nvidia.com >
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com >
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ashutosh Jha <ajha@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-02-21 16:31:59 +05:30
Rakesh Goyal
3decafa55a
nvethernetrm: eqos: Use single API to enable/configure filter
...
Configuring L3/L4 filter: osi_l3l4_filter() shall be called
Configuring L2 filter: osi_l2_filter() shall be called
Bug 2715384
Change-Id: Id5598b43a3723de4535b5595e019f6fced6c56ab
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2216068
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 >
GVS: Gerrit_Virtual_Submit
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com >
Reviewed-by: Ashutosh Jha <ajha@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-02-21 16:31:59 +05:30
Mohan Thadikamalla
521f9ddd19
nvethernet: Remove variable args API's for MISRA
...
Issue:
Variable arguments not allowed in misra/certc.
Fix:
Remove variable arguments API's and add
fixed arguments API
Bug 200553611
Change-Id: I5566683a01e1e65654c25f779ea96f68d9de8555
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2214093
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-02-21 16:31:59 +05:30
Bhadram Varka
6ef38dbc9d
nvethernetrm: fix map/unmap of Rx timestamp descriptor
...
Receive timestamp for a received packet will be in context descriptor
which is immediate of normal descriptor (has valid packet data)
In current case nvethernet driver only unmap normal descriptor buffer
address and provide the buffer to the network stack for data processing.
Context descriptor buffer is not unmapped which leads to running out of
IOVA space for the new buffers.
Context descriptor buffer can be used as is since that is not provided
to the network stack. So this change to a flag for context descriptor.
Based on this flag OSD can skip new buffer allocation and mapping for
the context descriptor and use already allocated buffer.
Bug 2700522
Change-Id: I18c8ebe39bf2eaaaeb13a9de3c9595cbe2ada45d
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2214726
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-02-21 16:31:59 +05:30
Mohan Thadikamalla
296166d895
nvethernetrm: Fix MISRA violation with ULONG_MAX
...
Issues:
Observed MISRA Rule 14.3 violations due to
ULONG_MAX comparison.
Fix:
Redesign this code by removing the ULONG_MAX
comparison logic and handle CERT-C
wrap violations.
Bug 200544430
Change-Id: I05e0dc03356ae19a0dcb895d35ef679f96575ac0
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2206001
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com >
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com >
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com >
Reviewed-by: Krishna Thota <kthota@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-02-21 16:31:59 +05:30
Mohan Thadikamalla
b711582e73
nvethernetrm: Fix CERT-C casting string issue
...
Issue:
Observed casting string literal pointer casting
to non-const issue in nvethernetmcal repo.
Fix:
Declare mac input parameter as constant in
osi_update_mac_addr_low_high_reg function definition.
Bug 200551115
Change-Id: Ie5c182a33056d99ba58227226d3c4c6908165d5b
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2200347
Tested-by: Praveen Mallaiah <pmallaiah@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com >
Reviewed-by: Narayan Reddy <narayanr@nvidia.com >
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com >
GVS: Gerrit_Virtual_Submit
Reviewed-by: Krishna Thota <kthota@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-02-21 16:31:59 +05:30
Narayan Reddy
ff5b7d28bc
nvethernetrm: add vlan tag stripping control
...
Provide a control to enable or disable
VLAN tag stripping
Bug 200549370
Change-Id: I0b7f59493cb6504edc1f94239b730c03e4444af6
Signed-off-by: Narayan Reddy <narayanr@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2191631
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-02-21 16:31:59 +05:30
Mohan Thadikamalla
174b0002d0
Fix CERT-C errors INT30-C, INT31-C, INT32-C
...
Issue:
Observed 177 CERT issue:
CERT INT30-C 158
CERT INT31-C 17
CERT INT32-C 1
CERT INT33-C 1
Fix:
Fix existing defects for above cert-C errors as per
recommended practices.
Bug 200546468
Bug 200512422
Change-Id: I54d6ee35566da1985f2aea83d8c4b10f71309fed
Signed-off-by: Srinivas Ramachandran <srinivasra@nvidia.com >
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2123080
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com >
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com >
Reviewed-by: Narayan Reddy <narayanr@nvidia.com >
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-02-21 16:31:59 +05:30
Mohan Thadikamalla
934dd4b840
nvethernetrm: Fix MISRA issues
...
Issues:
Observed below MISRA defects:
MISRA C-2012 Rule 17.4: 4
MISRA C-2012 Rule 8.5: 1
Fix Info:
- Handled the return values to clear MISRA 17.7 issues
- Properly defined dma_desc_init function declaration to
fix 8.5 MISRA issue
Bug 200512422
Change-Id: I6f5c5f2ad989d9c180d067018bc50ed325012375
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2176714
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com >
Reviewed-by: Narayan Reddy <narayanr@nvidia.com >
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com >
GVS: Gerrit_Virtual_Submit
Reviewed-by: Krishna Thota <kthota@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-02-21 16:31:59 +05:30
Narayan Reddy
f551f8ab61
nvethernetrm: Update comments with Doxygen style
...
replace kernel doc comments with Doxygen style comments
Bug 200512422
Change-Id: I2e8e1f395674ab9e1b66bf40c1f6cc0551608163
Signed-off-by: Narayan Reddy <narayanr@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2154252
GVS: Gerrit_Virtual_Submit
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com >
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-02-21 16:31:59 +05:30
Srinivas Ramachandran
006059e0a5
nvethernetrm: Implement external safety mechanism
...
EQoS MAC version < 5.10 is not safety certified. To ensure
some basic error handling situations, implement external
error handling mechanism in the driver to periodically
read and verify the current register content for certain
critical registers, against the last written value.
Bug 2594911
Change-Id: I1d7c01f89ad838ffe3ab1efd15126640ae9df775
Signed-off-by: Srinivas Ramachandran <srinivasra@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2136607
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com >
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com >
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-02-21 16:31:59 +05:30