Commit Graph

668 Commits

Author SHA1 Message Date
Bhadram Varka
08ea92dfbd osi: mgbe: support for get hw features
Bug 200565647

Change-Id: I3599f3606254bf70a8b4d48da0497f0c70c89ead
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
2024-02-21 16:31:59 +05:30
Mohan Thadikamalla
c18e66fecb nvethernetrm: mgbe: Implement PTP RX Queue support
Implement config_ptp_rxq call back to add PTP
RX Packets routing support.

Bug 200596985

Change-Id: I7a7649ab903c546d40a2c208fad381da8bfbc990
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com>
2024-02-21 16:31:59 +05:30
Mohan Thadikamalla
e540dd4386 nvethernetrm: Add RX Route support
- Add new ptp_rx_queue variable in
  osi_ptp_config structure.
- Declare an IP callback function
  for PTP RX queue index programming.
- Check and call IP based PTP RX queue
  callback in osi_ptp_configuration.

Bug 200596985

Change-Id: Ief040dc5b607ad729af5e9c0c1870249b456dcc7
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com>
2024-02-21 16:31:59 +05:30
Narayan Reddy
912cec99ca 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 200565917

Change-Id: I59b5eccc83770bc7dff9dadb192b733e0d01d7dd
Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2274444
Tested-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
2024-02-21 16:31:59 +05:30
Narayan Reddy
d7e31f4de7 nvethernetrm: mgbe: add flow control support
Add flow control support for MGBE.

Bug 200565905

Change-Id: I4edb82225cfd60fcff47d0aef11b516d9960961a
Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2278454
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
2024-02-21 16:31:59 +05:30
Mohan Thadikamalla
ea091f57ed nvethernetrm: mgbe: Add save and restore support
- Define missing register that requires
  save and restore support
- Define MGBE-HW-BACKUP group for these
  register backup index
- Define new mgbe_core_backup_config core_backup structure
- Add mgbe_core_backup_init call to
  initialize reg_addr of mgbe_core_backup_config
- Implement save and restore callbacks to
  save and restore of direct and indirect access registers

Bug 200596517

Change-Id: I58e9571a916223c90b3ed1f4622f57648c013c77
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2310184
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
2024-02-21 16:31:59 +05:30
Bhadram Varka
99ad1ad78e nvethernetrm: mgbe/eqos: Add support for VLAN
Adds support for VLAN insertion/deletion and filtering
on receive side.

Perfect filtering enabled for the VLAN filtering.
HW maximum has 32 VLAN perfect filters. If user adds
more than 32 then all VID's will be allowed

Bug 200565888

Change-Id: I75bdc261a77df4f9d9f5fff9a2943731de9dd4ef
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2312144
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com>
2024-02-21 16:31:59 +05:30
narayanr
a41808f643 nvethernetrm: mgbe: fix doxygen comments
Bug 200598918

Change-Id: I230c16d83070356efc8560b26a238db7927e7adf
Signed-off-by: narayanr <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2314668
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
2024-02-21 16:31:59 +05:30
Mohan Thadikamalla
06a55f9c41 nvethernetrm: mgbe: Add AVB CBS support
Add AVB CBS set and get operations
support.

Bug 200565900

Change-Id: I5402a5ac9dcb080c69a11aaa2eec52f68fe833b8
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2309941
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
2024-02-21 16:31:59 +05:30
narayanr
c7a29545c6 nvethernetrm: mgbe: add rx stats
Bug 200565898

Change-Id: If3bb00422d77d24e2425764015db25cdf4e1d930
Signed-off-by: narayanr <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2309521
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
2024-02-21 16:31:59 +05:30
narayanr
f19748b798 nvethernetrm: mgbe: Add support to forward error pkts
Added support to configure Rx MTL Queue to drop or
forward the error packets to DMA or application

Bug 200565898

Change-Id: I5e5dbad01c07f7b6efd1a1a0b9c07fcafa9050e5
Signed-off-by: narayanr <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2310097
Reviewed-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
2024-02-21 16:31:59 +05:30
Bhadram Varka
7235eee925 nvethernetrm: mgbe: Enable/Disable slot function control
Bug 200576205

Change-Id: I694dbb73f262fe0a1b8b6cca8796f4934feeacd3
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2260753
2024-02-21 16:31:59 +05:30
Bhadram Varka
b7979a67f1 nvethernetrm: mgbe: add support for jumbo frames
Bug 200565893

Change-Id: Id27f78180a7d2562c3306e2290555f1609e03a48
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2292258
2024-02-21 16:31:59 +05:30
Mohan Thadikamalla
00e4638fa3 nvethernetrm: mgbe: Add L3 and L4 filtering
Add L3 IP address filtering support and
L4 port filtering support

Bug 200565909

Change-Id: I31748cfacf41bb6358813b80eabb57dd6416da5c
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2274443
2024-02-21 16:31:59 +05:30
Mohan Thadikamalla
68a1d27ab0 nvethernetrm: mgbe: Add DA/SA/MC/BC filtering
Add support for DA/SA/MC/BC L2 address filtering.
Enable MCBC queue, and set queue1 for MCBC queue.

Bug 200565909

Change-Id: I79c2608d1f878695eb8f9c8c3c836c1d458095a0
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2274442
2024-02-21 16:31:59 +05:30
Mohan Thadikamalla
9d98a5bc54 nvethernetrm: mgbe: Add VLAN filtering
Add MGBE VLAN filtering support.

Bug 200565888
Bug 200565909

Change-Id: Ie3a3852d5c2305b14aa46fb5c8756c7e47a66a05
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2274441
2024-02-21 16:31:59 +05:30
Mohan Thadikamalla
9162057291 nvethernetrm: mgbe: Add L2 DA filtering
Add MGBE L2 DA perfect and inverse
filtering support.

Bug 200565909

Change-Id: Ic8648d4fed4fa4ab0c4d98b0d791250a8fbf0c04
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2274440
2024-02-21 16:31:59 +05:30
Bhadram Varka
97f009065a nvethernetrm: Add mgbe MMC stats support
Bug 200565915

Change-Id: I8e14f47c050d8f1db196ddbaaab8a7e99f6eeb27
Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2258485
Reviewed-by: Mohan Thadikamalla <mohant@nvidia.com>
2024-02-21 16:31:59 +05:30
Bhadram Varka
19219bcfb0 nvethernetrm: mgbe: support for ARP offload
Bug 200565907

Change-Id: I9c2726127429b3533ebbd594e4e723fabd9cb04f
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2258487
2024-02-21 16:31:59 +05:30
Bhadram Varka
3f706c7031 nvethernetrm: mgbe: support for Tx/Rx checksum offload
Bug 200565907

Change-Id: I25b7734600e51bc8e6a460a7adc0967f7b0f4b42
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2258486
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
2024-02-21 16:31:59 +05:30
Bhadram Varka
5010de06b1 nvethernetrm: mgbe: add support for MAC loopback
Enable/Disable MGBE loopback mode by set/clear
loopback mode (MGBE_MAC_RMCR_LM) in MAC receive
configuration.

Bug 200565892

Change-Id: Ibd23b264623d9a8b80b7fbe743167df94cd93baf
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2252672
2024-02-21 16:31:59 +05:30
Bhadram Varka
5e4c56406f nvethernetrm: mgbe: support for PHY MDIO read/write
Adds support for MGBE MDIO read/write into PHY.
It moves EQOS specific code from OSI layer to EQOS layer.

Bug 200565891

Change-Id: Ia9755a4d1a7a22560f499801375736ed0ab99c30
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2258484
2024-02-21 16:31:59 +05:30
Bhadram Varka
41ef64576a nvethernetrm: xpcs: XPCS initialization
Add support for XPCS initialization in USXMII mode
and start of XPCS will happen once speed set for MAC.

Bug 200552796

Change-Id: I4c98bec2e92d9b189c7d2404705e28b969592f33
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2258482
2024-02-21 16:31:59 +05:30
Bhadram Varka
a2b8d81e43 nvethernetrm: mgbe: support for MAC speed set
Adds support for programming MAC speed based
on PHY speed.

Bug 200565886

Change-Id: I486444186b5575f68d6336229e0672e219725444
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2258483
2024-02-21 16:31:59 +05:30
Bhadram Varka
c0091a34ef nvethernetrm: add support for MGBE initialization
Adds MAC CORE and DMA initialization support for
MGBE MAC Controller.

Bug 200548572

Change-Id: I6796229852b47ff0748a848a6dbe9addab6ab74f
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2250401
2024-02-21 16:31:59 +05:30
Bhadram Varka
1917175428 osi: dma: fix misra/cert issues
Bug 200671160

Change-Id: I23c70347e91a51eb33ababce27aa0a33dc8ab01c
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
2024-02-21 16:31:59 +05:30
Bhadram Varka
f796b992b5 osi: dma: fix coverity issues
Bug 200671160

Change-Id: Ic2f0ce168cb7c551262e569cec420852836094a3
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
2024-02-21 16:31:59 +05:30
Bhadram Varka
d2dd7fefbf osi: core: fix coverity/misra issues
Bug 200671160

Change-Id: I98f0bb2a4a0fde05b81551cd2dd0cab4ddac13dc
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
2024-02-21 16:31:59 +05:30
Bhadram Varka
823aa0ef5a osi: core: fix coverity issues
Defects/Coding rule violations found : 3 Total
	FORWARD_NULL 	 1 - (Deviation Not approved)
	UNUSED_VALUE 	 2 - (Deviation Not approved)

Bug 200671160

Change-Id: Icabb21606a5758ad79e92d9d67e2be9cb889723e
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
2024-02-21 16:31:59 +05:30
Rakesh Goyal
cd35e725a8 Revert "core: handle ioctl in single API"
This reverts commit 6b8e39f6d3.

Bug 200671160

Change-Id: Icf22d93e83efbff7cb2a3cdfd5d169e3fd454b4a
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com>
2024-02-21 16:31:59 +05:30
nannaiah
49f168e572 nvethernetrm: Add IVC support to read mmc counters.
Bug 2694285

Change-Id: I4d88b99968a90108fcb218eb607318da14875834
Signed-off-by: Nagaraj Annaiah <nannaiah@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2499175
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Rakesh Goyal <rgoyal@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
rakesh goyal
a16b1a8a03 core: handle ioctl in single API
To reduce number of external interface APIs,
consolidate all IOCTL API to one interface API.

Bug 200671160

Change-Id: I324bf794b66f6267b9cf4c64059bdd07b90579d4
Signed-off-by: rakesh goyal <rgoyal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2493164
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@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
Bhadram Varka
64afd564e4 osi: single API to handle DMA interrupts
Issue: Currently there are multiple API's for
handling DMA interrupts.

Fix: Creating single API to handle DMA interrupts.

Bug 200671160

Change-Id: I9385e8fb0ca044c7a01d38483226e2e83f76f5b9
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2497610
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
9d9cbb6682 osi: Update numberic literal usage to MACROS
Issue: Need to use MACRO's wherever possible for numeric literals.

Fix: Update numeric literal usage to MACROS.

Bug 200684454

Change-Id: I340342a8680f3caee0856440e9f03aacd85e48ac
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2492366
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
35bb4dee50 osi: eqos: only interface APIs accessible form OSD
Issue:	Many non API functions are accessible from
	OSD code which can be used to update/access
	HW registers.
Fix:	Move non API function to local files and
	remove header files from code shared with OSD
	so these function can be accessible only
	within OSI code

Bug 200671160

Change-Id: Ic396b3b34e20cd8ee6b252e745df12f4532d0e10
Signed-off-by: rakesh goyal <rgoyal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2494297
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
d39e02d47e osi: don't expose DMA ops to OSD
Issue: Currently OSD has access to osi_dma_ops
so these operations can be changed by OSD.
Also each entry funnction has checks for validating
these function pointers which would increase the
unit tests as well.

Fix: Move dma_ops to inside OSI and set a flag
indicate that DMA software init done. Each entry
function needs to check only flag.

It also fixes couple of doxygen comments issues.

Bug 200671160

Change-Id: I675e24cbfca8f4023fd31709f246230d2070d716
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2490156
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-by: Narayan Reddy <narayanr@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>
GVS: Gerrit_Virtual_Submit
2024-02-21 16:31:59 +05:30
Bhadram Varka
251441ff2c osi: ivc: support for get_hw_features
Issue: Recently get_hw_features function pointer added
to get the HW features. This pointer is missing for
IVC operations which resulted in kernel panic.

Fix: Add support for IVC get_hw_features

Bug 200671160

Change-Id: I95aa82b157790d6fbf4626000c318d52f3d248ee
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2495585
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-by: Nagaraj Annaiah <nannaiah@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@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
Bhadram Varka
37a103c11d osi: don't expose core_ops to OSD
Issue: Currently OSD has access to osi_core_ops
so these operations can be changed by OSD.
Also each entry funnction has checks for validating
these function pointers which would increase the
unit tests and complexity as well.

Fix: Move dma_ops to inside OSI and set a flag
indicate that CORE software init done. Each entry
function needs to check only flag

Bug 200671160

Change-Id: I6def9e5c39f90a08eb4f48a124a1c2c8c65175a4
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2435991
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@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
Srinivas Ramachandran
6e3d5b3006 nvethernetrm: Mask packet type before setting Rx pkt flags
Issue: Packet type is a multi-bit field and the value of
       certain bits should be compared for direct decimal value
       across all bits, rather than selectively checking that bit
       alone.
Fix:   Mask the entire bit field length before setting the Rx pkt
       context flags.

Bug 3266454

Change-Id: I739ad1a23abfcde5db516f00bcbe88085b405d82
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2489996
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
f91a777e64 core: move get_hw_feat to osi_core
No api from osi_common should be direclty accessible
from OSD code. moving osi_get_hw_feat to osi core.

Moving following API to common/common.h
osi_memset()
osi_memcpy()

Bug 200671160

Change-Id: Idd6269b01ee8ec21c7f3c5b7f3376cf9a91bb661
Signed-off-by: rakesh goyal <rgoyal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2488875
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
22b25f8b97 Add fix to misra & cert errors for ethernet server
Bug 2694285

Change-Id: I6b899538ed92f67351cc21ccbb900d842e91ad5d
Signed-off-by: Nagaraj annaiah <nannaiah@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2486524
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-02-21 16:31:59 +05:30
nannaiah
7214b9fc7d Enable IVC core functionality for QNX
1. Enable IVC core.
2. Move ivc_flush_mtl_tx_queue and ivc_reset_mmc under macro to fix
   build failures.

Bug 2694285

Change-Id: Id090831bc3f8150bb381fba70537beb34aa9ccc0

Signed-off-by: Nagaraj Annaiah <nannaiah@nvidia.com>
Change-Id: Id090831bc3f8150bb381fba70537beb34aa9ccc0
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2475827
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-02-21 16:31:59 +05:30
Bhadram Varka
49d26e6991 osi: rename osi_dma_local.h to dma_local.h
osi_dma_local.h is not shared with OSD so renaming it to
dma_local.h.

Bug 200671160

Change-Id: I73feb883b1628e638c3175033e5810dc3044c870
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2491204
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@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
Bhadram Varka
8b595b8ddd osi: delete osd_ops functions
Bug 200620687

Change-Id: I1b3d46b86e3d9679a5b4db780aa8ea17a0349c8a
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2483072
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
ae2bbaf49a osi: remove core API to get MAC time
Issue:
dma_base pointer being checked in osi_get_systime_from_mac()
API which will be not populated OSD which resulted in PTP
time sync issues.

Fix: Use DMA API inside OSD to get MAC time and remove
dma_base usage.

Bug 200696375

Change-Id: I807a99b6af82a12eddd830f5b010c4a83e8b7b92
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2487698
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: Nagarjuna Kristam <nkristam@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2024-02-21 16:31:59 +05:30
Srinivas Ramachandran
8cf552c505 nvethernetrm: Do not touch descriptor after setting OWN bit
Issue: Rx descriptor is being modified after setting OWN bit
       to HW. This is resulting in race conditions with HW,
       where HW opens the descriptor and SW is also writing to it,
       resulting in corruption of the descriptor due to which
       HW tries to access an invalid buffer address. This leads
       to SMMU fault prints observed in the debug uart, and
       eventually results in Rx DMA getting hung during long
       hour test.
Fix:   Move the OWN bit setting to the very last step in Rx
       descriptor handling. Do not touch the descriptor from SW
       after this point until Rx irq processing.

Bug 3194355

Change-Id: I07fc68f49123947a126e6a2fdb9433a871d75999
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2483737
Tested-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Reviewed-by: Ajay Gupta <ajayg@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2024-02-21 16:31:59 +05:30
Nagarjuna Kristam
dcca85ffd3 osi: update input arguments with boundary values
Issue:
Verification checklist requests input params with boundaries for external
interfaces to be documented.

Fix:
Add boundaries for input argument which has boundaries implemented.

Bug 200673381

Change-Id: I4ffac5dcabf836038cf9b2c4e448ec1f881ef271
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2472860
(cherry picked from commit a84e13325795fb63ad567c95c10813875604e26a)
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2474894
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Gaurav Asati <gasati@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>
GVS: Gerrit_Virtual_Submit
2024-02-21 16:31:59 +05:30
rakesh goyal
9d3502cd97 osi: dma: core: fix static analysis errors
Issue:	Introduced Coverity and Cert errors which
	are identified with 2020.06 config file
Fix:	Coverity and Cert errors fixed

Bug 200689877

Change-Id: I1bc6278162692468bfb67cf61c144ed2f81bc72f
Signed-off-by: rakesh goyal <rgoyal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2466677
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2468656
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: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Krishna Thota <kthota@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2024-02-21 16:31:59 +05:30
nannaiah
7ef5627a3a nvthernetrm: Fix wrong typecast in eqos core.
Issue: Few functions as wrong typecasts for base addr.

Fix: Fix wrong typecasts from uint32_t to uint8_t.

Bug 3191816

Change-Id: I7a850b775a92038a30297449e2d463e29702b554

Signed-off-by: Nagaraj Annaiah <nannaiah@nvidia.com>
Change-Id: I7a850b775a92038a30297449e2d463e29702b554
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2469680
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: Rakesh Goyal <rgoyal@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
nannaiah
3f204d6f16 nvthernetrm: Add IVC support for OSI
In case of virtualization the OSI functions will be handled
at Ethernet Server. Add IVC support where OSD can send
IVC packets to ethernet server. Ethernet Server parses the
messages and calls the corresponding OSI API.

OSI and few DMA API's are updated to support osi_core as an
argument.

Bug 2694285

Change-Id: Ic56b8e9f5f9cd70cc70239b61d756bfa2e998588
Signed-off-by: Nagaraj Annaiah <nannaiah@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2435281
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-02-21 16:31:59 +05:30