Commit Graph

371 Commits

Author SHA1 Message Date
nannaiah
975e946c85 nvethernet: Add workqueue to set Rx mode.
Issue:
Network RTNL lock disables scheduler which causes IVC hang.

Fix:
- Add workqueue to set Rx mode.
- Change IVC spinlock to workqueue.
- Add virtualization check for macsec clk init.
- Add Read & Write Register.

Bug 2694285

Change-Id: I8354b500c62c0145eeed9a66bfcc8227fc8999e7
Signed-off-by: Nagaraj annaiah <nannaiah@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2520309
2022-11-01 14:27:08 +05:30
Mahesh Patil
c804eef959 nvethernet: Reduce mtu if macsec enabled
Reduce mtu size due to macsec sectag in probe and change_mtu call
instead of open call to avoid wrong update of mtu size when interface up/down
is performed.

Bug 200730979

Change-Id: I17198d25295bc40d37204f5d0603696a0071f490
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2529412
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
GVS: Gerrit_Virtual_Submit
2022-11-01 14:27:08 +05:30
Mahesh Patil
d814423323 nvethernet: Support multiple SC's
Add support for multiple SC's, so that multiple SC's can be
created using wpa_supplicant

Bug 200672416

Change-Id: Iaaa77972f989a3fafb5ade05c13c50d718bf9da9
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2511176
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
GVS: Gerrit_Virtual_Submit
2022-11-01 14:27:08 +05:30
Mahesh Patil
ddd655451d nvethernet: Remove osd callback from osi
Remove calling osd callback from osi to program SAK and
program SAK from OSD itself.

Bug 3308383

Change-Id: I38192a6d036fda190a6cd8f3a901a79511972614
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2528694
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
GVS: Gerrit_Virtual_Submit
2022-11-01 14:27:08 +05:30
Bhadram Varka
a79b1f58c0 nvethernet: support for page pool
Add support for page pool and
enable it when CONFIG_PAGE_POOL
config got enabled.

Bug 200686236

Change-Id: I08efd68106182f65eac4e24b9f55baa22ce5968b
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/linux-nvidia/+/2532360
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
2022-11-01 14:27:08 +05:30
Mahesh Patil
b55cba3cf7 nvethernet: Update mac/macsec init
Update mac/macsec init programming
1. macsec clock and reset programming order at init and deinit
2. macsec SOT values as per macsec IAS
3. mac IPG values as per macsec IAS

Bug 3266535

Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Change-Id: I29c829c47d0ae7e3529464da79ba6a9a2bc68919
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2506487
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
2022-11-01 14:27:08 +05:30
Rakesh Goyal
7f9b76c903 nvethernet: read MAC address from DT for new platform
Read index from ethernet DT node to index for MAC
address.

Bug 200724410

Change-Id: I714e73a500b3ce6d7b7a5e31cf48f8d4e239e9cc
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2531839
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
2022-11-01 14:27:08 +05:30
Bhadram Varka
af92743699 nvethernet: update UPHY GBE mode with DT/sysfs
Bug 3288030

Change-Id: Id700c2b074c3fd8968ac632e84d7cdc0d75d1e32
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2531233
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com>
2022-11-01 14:27:08 +05:30
Bhadram Varka
38e18d40ec nvethernet: remove bypassing of clks/resets for VDK/uFPGA
Bug 3288030

Change-Id: I6905f76a73c0cf3df5196768334bf7cd1ba129e9
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2529194
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com>
2022-11-01 14:27:08 +05:30
Bhadram Varka
719d5641dd nvethernet: add support for MGBE/XPCS clocks
Bug 3288030

Change-Id: I78c88d86ff99010b3656c62f1074df30c068db66
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2529193
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com>
2022-11-01 14:27:08 +05:30
Bhadram Varka
ae45ba80a8 nvethernet: add support for XPCS reset
Bug 3288030

Change-Id: I5e08c266befec52094c508719bff8e8d8e8ef696
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2522194
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com>
2022-11-01 14:27:08 +05:30
Rakesh Goyal
848c6a2e9a nvethenret: use GFP_KERNEL instead of GFP_ATOMIC
Issue:  For set_rx_mode() implementation, current design is creating
        local list nodes with ATOMIC because this call in not in
        Atomic context.

Fix:    Use GFP_KERNEL flag to allocate memory for local list node.

Bug 200729431

Change-Id: I513ddce8a661ab6f465509791101e98c83bc8e96
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2527627
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
2022-11-01 14:27:08 +05:30
rakesh goyal
3479a84bc7 nvethernet: remove void pointers input arguments
removed void pointers function arguments for osd dma
callbacks

Bug 2739123

Change-Id: I8430d99c1528a7705d8016e2bfa15a027e82d515
Signed-off-by: rakesh goyal <rgoyal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2514923
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Nagaraj Annaiah <nannaiah@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
2022-11-01 14:27:08 +05:30
Rakesh Goyal
01d2b3fe51 nvethernet: L2 filter index handling at OSD layer
Linux OSD code maintaining link list to identify L2
filter added/removed in compare to earlier list.
By doing this OSD sends address and dma channel which
should to be removed from hardware instead of full
list every time.

Bug 200711542
Bug 200711544
Bug 200713215

Change-Id: I95d4dc687c5fd45a6e0bbc3c097e59b90b03b0e5
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2519592
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
2022-11-01 14:27:08 +05:30
Bhadram Varka
dfc705b07b nvethernet: use info log for default settings case
For TXQ and PTP RX queue, default setting are marked as errors
instead they needs to be marked info level logs.

Bug 200722499

Change-Id: I992a09661eb79a25b48999ef9b154b39be3cbb3d
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2523246
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com>
2022-11-01 14:27:08 +05:30
Rakesh Goyal
32ed166339 nvethernet: use L2 filter command to set MAC address
Issue:
1) Missing support for packet MC/BC packet duplication
2) Remove MAC UC and BC address on ether_close()

Fix:
1) Update OSI_CMD_L2_FILTER structure parameter to support
new algorithm.
2) MAC UC and BC address added to filter from ether_open()
and ether_resume() function.
3) Configure MAC register to support MC/BC packet
duplication

Bug 200711542
Bug 200711544
Bug 200713215

Change-Id: Ie589892de121e5873f5dfa9b9db9bf5c441ece71
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2519591
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
2022-11-01 14:27:08 +05:30
Mahesh Patil
90a4dce1fb nvethernet: Add aes 128/256bit macsec config
Adding aes 128/256 bit config support through sysfs node

Bug 3257779

Change-Id: I53b05842484d4ae0e9c51439415d35b171852574
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2484203
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
GVS: Gerrit_Virtual_Submit
2022-11-01 14:27:08 +05:30
Rakesh Goyal
e061e50704 nvethernet: compile osi hal layer code
Bug 200671160

Change-Id: If8041c258b92e6050f7c2051c7e6992ff07158b6
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2509242
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
2022-11-01 14:27:08 +05:30
Mahesh Patil
023efe53b2 nvethernet: Enable key program through TZ
Enabling macsec key's programming using TZ

Bug 3246511

Change-Id: I07d921018a611e4c8dd57aaa27d20a845c9af658
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2478492
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Tested-by: Bhadram Varka <vbhadram@nvidia.com>
2022-11-01 14:27:08 +05:30
nannaiah
ca2466ab09 nvethernet: Add fix to support virtualization.
1. Disable Power Ungate if virtualization is
   enabled.
2. Remove use_stats flag.

Bug 2694285

Signed-off-by: Nagaraj annaiah <nannaiah@nvidia.com>

Change-Id: I76b22ae0459760558b6e2dccc181615d545b629d
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2513958
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Tested-by: Nagaraj Annaiah <nannaiah@nvidia.com>
2022-11-01 14:27:08 +05:30
Mahesh Patil
3034739537 nvethernet: Enable macsec debug feature
Validate input parameters and handle debug
buffer interrupts

Bug 3265346

Change-Id: I145949293e149ab93a53beea848b0869b7fa42fa
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2498053
Tested-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
2022-11-01 14:27:08 +05:30
rakesh goyal
1c87167250 nvethernet: use single API for ioctl
To reduce number of external OSI interface APIs,
consolidated all IOCTL API to one interface API.
OSD should use same for all interaction to OSI.

Bug 200671160

Change-Id: I2ada2746f29be6cf396709c2ec12dd96d4a5ca15
Signed-off-by: rakesh goyal <rgoyal@nvidia.com>
2022-11-01 14:27:08 +05:30
Bhadram Varka
d792dda9be nvethernet: use get_core/get_dma API's
Change-Id: I10506fe522763b9f06b74b52cf2c31a9601cb937
2022-11-01 14:27:08 +05:30
Mahesh Patil
fb0487286a nvethernet: Reduce 2 byte ethertype from mtu
Add 2 byte to SECTAG+ICV length to reduce 2 byte mtu size
Bug 200690445

Change-Id: I5136dbc275b03f159fc2e734c646392569f0de49
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
2022-11-01 14:27:08 +05:30
Srinivas Ramachandran
805fe9c4fa nvethernet: Add support for MACsec controller
This commit adds the driver interface for the
MACsec controller. The driver interface is
invoked using generic netlink messages from
userspace MACsec key agreement agent.

Currently sysfs node is added to check the irq
stats for default macsec controller operation.

Bug 2913560

Change-Id: I07b0b778ba1c6674e87b103a3e68e158fea61c2c
Signed-off-by: Srinivas Ramachandran <srinivasra@nvidia.com>
2022-11-01 14:27:08 +05:30
Mohan Thadikamalla
c651869a94 nvethernet: Enable PTP offload support
Code to provide IOCTL to enable PTP offload.

Bug 200562286

Change-Id: Idea085979760182e6e832963afb316c7fe508f79
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2319555
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Tested-by: Bhadram Varka <vbhadram@nvidia.com>
2022-11-01 14:27:08 +05:30
Mohan Thadikamalla
9f70a55384 nvethernet: Add Multiple DMA channels route
- Add a new DT node to enable Multiple DMA routing
for netdev MC MAC ddress. Read the DT value
and store it into OSI core private data.
- Add new driver private IOCTL for MC DMA channels
selection as inputs and call ether_set_rx_mode
to update MAC filters with given DMA channels route.

Bug 200565911

Change-Id: I1e65322489e34c4b6318a769dac963073d4887ad
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com>
2022-11-01 14:27:08 +05:30
Bhadram Varka
65801ffa7b nvethernet: power ungate and reset support for MGBE
Change-Id: I5bfddc8e7d7c53bca7d74c800f23e0f592c1e3be
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
2022-11-01 14:27:08 +05:30
Mohan Thadikamalla
c2f3c724bd nvethernet: Add FRP command IOCTL support
Add new private IOCTL to perform
Flexible Receive Parser table entry
add, delete, and update operations
using OSI API call.

Bug 200565623

Change-Id: I00f2be1aaa6ee737de5154085be0521db0bb9593
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2331371
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
2022-11-01 14:27:08 +05:30
Rakesh Goyal
f244049a90 nvethernet: TSN support
Initialize TSN and ioctl support for configuration

Bug 200561100

Change-Id: Ic8a488de7850b63a593db69e626b19ad139811a1
Signed-off-by: rakesh goyal <rgoyal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2319819
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
2022-11-01 14:27:08 +05:30
Rakesh Goyal
59e2c42725 nvethernet: Extend PTP support
Adding support for one step sync
Adding support for user input from sysfs node

Bug 200562043

Change-Id: I686f035d54c8fb998db968178aca772258830ec7
Signed-off-by: rakesh goyal <rgoyal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2314229
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
2022-11-01 14:27:08 +05:30
Bhadram Varka
a6520f2194 nvethernet: add support for RSS
Changes takes care generation Hash key and population
of hash table with necessary information.

It also adds support ethtool to get/set hash key/table.

Bug 200565647

Change-Id: I5d5364bc88f4dea9456919b886dd8ede7f638ae3
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2263899
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
2022-11-01 14:27:08 +05:30
Mohan Thadikamalla
7f172a52f5 nvethernet: Add PTP RX queue support
- Define new "nvidia,ptp_rx_queue" DT node entry
- Read "nvidia,ptp_rx_queue" DT node value into
  osi_core->ptp_config.ptp_rx_queue. On no DT
  entry case set this value to "osi_core->mtl_queues[0]"
- Validate "osi_core->ptp_config.ptp_rx_queue" value
  with "osi_core->mtl_queues" array values. If no match
  found give error and set this value to
  "osi_core->mtl_queues[0]"
- Add new private IOCTL command to call OSI RX route API.

Bug 200596985

Change-Id: I2c05d4c6f3f4207d9efd6b6777d29fe2409de1a3
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2312295
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com>
2022-11-01 14:27:08 +05:30
Bhadram Varka
5ab61e947e nvethernet: Add VLAN add/del actions
Bug 200565888

Change-Id: I20e33a09af0d64bc5beaa49d83aae98394d6998f
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2313481
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: Mohan Thadikamalla <mohant@nvidia.com>
2022-11-01 14:27:08 +05:30
Bhadram Varka
663753148e nvethernet: Add MGBE stats for ethtool
Bug 200565915

Change-Id: If450f4c7c1619f8b013403f8b0c2135a34f472d3
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2292238
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
2022-11-01 14:27:08 +05:30
Bhadram Varka
84f7188953 nvethernet: add EQOS/MGBE desc ops to build system
Bug 200565907
Change-Id: I6ea3a2367a59627bec356655ba30a49c8126623d
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2263900
Reviewed-by: Automatic_Commit_Validation_User
2022-11-01 14:27:08 +05:30
Bhadram Varka
824a77cfd7 nvethernet: add support for XPCS
Adds supoort for getting XPCS base address from DT

Bug 200552796
Change-Id: I078f0aeca8a2e10fe1dfba7cf23c6ff285a110d1
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2270581
2022-11-01 14:27:08 +05:30
Bhadram Varka
29fb064269 nvethernet: add support for MGBE
Adds support for MGBE based on MAC controller version.
Also integrated MGBE files to Linux build system

Bug 200548572

Change-Id: I1c5a63cb3b843daa60500254e1272449cc2e8e49
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2252647
2022-11-01 14:27:08 +05:30
Bhadram Varka
93924a32f3 Revert "nvethernet: use single API for ioctl"
This reverts commit 5bbeaa61e89ee6375a15020f2ef533b5ed66d628.
2022-11-01 14:27:08 +05:30
nannaiah
8c8eceeeb7 nvethernet: Add IVC fix
Issue: rt_spinlock causes IVC failures.

Fix:
1. Change rt_spinlock to spinlock.
2. Add timeout to ivc_can_read.

Bug 2694285

Change-Id: Ib603c304e750a33262e8509ed3f869030b934958
Signed-off-by: Nagaraj Annaiah <nannaiah@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2497217
Tested-by: mobile promotions <svcmobile_promotions@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
2022-11-01 14:27:08 +05:30
rakesh goyal
f4d30eb89b nvethernet: use single API for ioctl
To reduce number of external OSI interface APIs,
consolidated all IOCTL API to one interface API.
OSD should use same for all interaction to OSI.

Bug 200671160

Change-Id: I05324777c9bd7ed3c167e4f8a629af2e695389d2
Signed-off-by: rakesh goyal <rgoyal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2493248
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-11-01 14:27:08 +05:30
Bhadram Varka
71fa042ce4 nvethernet: use osi_handle_dma_intr() API
Bug 200671160

Change-Id: Id293c02529beb7e72ef567508c74c1a7de6bae79
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2497651
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com>
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>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-11-01 14:27:08 +05:30
nannaiah
e411787070 nvethernet: Enable IVC for kernel 5.10
Bug 2694285

Change-Id: I80a66c86f9cb4974454b41dfde3707ab36e15c24
Signed-off-by: Nagaraj annaiah <nannaiah@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2495280
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
2022-11-01 14:27:08 +05:30
rakesh goyal
9f61b817f7 nvethernet: use raw_spin_lock_* for RT kernel
Issue:	raw_spin_lock* should be used with RT kernel
Fix:	update code to use raw_spin_lock* APIs instead of
	spin_lock*

Bug 200671160

Change-Id: I5a1d187d2ead6394d97bbdcb41533852b4708afe
Signed-off-by: rakesh goyal <rgoyal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2493350
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-11-01 14:27:08 +05:30
rakesh goyal
8363bf6e9d nvethernet: update code to use updated get_hw_feat api
Bug 200671160

Change-Id: If9d1de5c51382ad3bc87e401ddf9b61f52d70254
Signed-off-by: rakesh goyal <rgoyal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2488876
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Narayan Reddy <narayanr@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>
2022-11-01 14:27:08 +05:30
Bhadram Varka
b427be9267 nvethernet: assign OSD ops
Bug 200620687

Change-Id: I9e0b9b87ba425b446b60576a1ddae938ff514a2f
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2483069
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: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2022-11-01 14:27:08 +05:30
Bhadram Varka
34421635d5 nvethernet: use DMA API to get the MAC time
Bug 200696375

Change-Id: I2403359233bc5236b3c233ec5044cd61dfa4bb67
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2487877
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@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>
2022-11-01 14:27:08 +05:30
nannaiah
ca57e74aea nvethernet: Add OSD IVC support
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.

Bug 2694285

Change-Id: I0f8a23d33fe3fc87e2582101a6bef6f911e1226d
Signed-off-by: Nagaraj Annaiah <nannaiah@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2439193
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Rakesh Goyal <rgoyal@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>
2022-11-01 14:27:08 +05:30
Bhadram Varka
c606c85e93 nvethernet: change ethernet suspend/resume level
Change suspend_noirq/resume_noirq to suspend/resume
for kernel-5.10. Its observed that facing memory
issues in noirq level.

Bug 200664943

Change-Id: Iece68d11ad947bd30573799f891086eed175f175
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2458118
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-11-01 14:27:08 +05:30
narayanr
958ea205da nvethernet: remove setting of dma_mask
Issue: Seeing MC errors when setting the DMA mask to 40bit.

Fix: Maximum system mask which can be set on tegra is 39bit
and is enabled by default for all clients. So removing the
setting of DMA mask so that the default value can be used

Bug 200681386

Change-Id: I4820a64c011d92bde2947969fdfa535b692c37ab
Signed-off-by: narayanr <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2454950
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-11-01 14:27:08 +05:30