Commit Graph

455 Commits

Author SHA1 Message Date
Revanth Kumar Uppala
928bbd8792 r8168: Replace kernel version checks with conftest
Use conftest instead of version checks for api changes
across the kernels.

Bug 4471899

Change-Id: Ia0750eb8e4d634c0a6ed71b6eb64857cddaf467f
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3134835
(cherry picked from commit dd4ca5aab9)
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3147967
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-06-12 01:09:46 -07:00
Revanth Kumar Uppala
954d58f2bc r8168: Disable 10M EEE
- This disables 10M EEE for r8168 driver

Bug 4205197
Bug 4652606

Change-Id: I804b0d53460d19d8ed0b692b7327210634e2a111
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3123376
(cherry picked from commit 6b62a514a3)
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3147912
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-06-12 01:09:41 -07:00
Revanth Kumar Uppala
91baac051e r8168: Fix -20C 10mbps failure in Mods test
Issue:
Ethernet mplan stability tests at -20C for 10Mbps fails with rate 15%
Basically the GPHY 10M power saving includes the below parameters,
clock speed down, pll off and reference voltage off.
During debugging it was found that enable/disable pll circuit
frequently when in 10M low data traffic (such as idle mode) may have
a corner case and plays a part in this issue repro.

Fix:
So plloff saving function should be disable (do not have to open it) for nvidia -20C mplan test case.

Bug 3946623
Bug 4652606

Change-Id: Ifabe9e26e840537520d66acca106b37d3c285722
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3123359
(cherry picked from commit 20dbe0996b)
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3147911
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-06-12 01:09:36 -07:00
Revanth Kumar Uppala
6d4ef6154e r8168: Change file permissions of source files
Remove executable permissions for source files

Bug 4471899
Bug 4652606

Change-Id: I4d259b03014a8853b9baf0d04265ad521fefddb9
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3123346
(cherry picked from commit ae13276f5d)
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3147910
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-06-12 01:09:31 -07:00
Revanth Kumar Uppala
4643e350da r8168: update driver to 8.053.00
- Update realtek r8168 driver version to 8.053.00
- This update adds support till K6.8

Bug 4471899
Bug 4652606

Change-Id: I77734753b8ad9ca108afccda609d29ea73c848f5
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3123343
(cherry picked from commit 7086a36e68)
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3147909
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-06-12 01:09:26 -07:00
Jon Hunter
cb70a7e245 net: nvethernet: Fix support for Linux v6.9
When nvethernet was updated to support Linux v6.9 kernels, the code that
checks if the variable 'eee_req->advertised' is zero or non-zero was not
updated correctly. For Linux v6.9, the variable 'eee_req->advertised' is
a bitmask and so cannot be checked directly to see if it is zero or
non-zero. Building the nvethernet driver with the flag '-Werror=address'
exposed this issue. Fix this by using the 'linkmode_empty()' function to
determine if 'eee_req->advertised' is zero or non-zero for Linux v6.9
kernels.

Bug 4471899
Bug 4662166

Change-Id: Id4080d62006226648cd398dc8652578c74dd8158
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3146810
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2024-05-29 09:24:33 -07:00
Shubhi Garg
f902d95962 drivers: mttcan: fix bus-off restart txfer
[Issue]: CAN freezes/stops to send messages after restart from bus-off state.
Throws following log from kernel: "write: No buffer space available"

[Reason]: When message txfer starts, tx_object (which keeps track of active tx)
gets filled. If CAN goes to bus-off state, txfer remains incomplete for some
messages. In such case, tx_object bits will not get cleared. It will stop
adding more messages in controller RAM.

Along with tx_object, from network layer, there are socket echo buffers.
When CAN is initialized and up on network, netif_start_queue is pushed to start
transmission. When msg txfer starts, socket buffer gets filled and freed only
when txfer completes. During bus-off, since network queue remains ON, all the
queued msgs get filled in socket buffers and does not allow upcoming msgs.
Therefore we see "write: No buffer space available".

[Fix]: Clear tx_object when device goes to bus-off state and stop network queue.
Start network queue again during restart from bus-off.

Bug 4438223

Change-Id: I3cbc6529a90f357372c8b0095bdce4217b133e9b
Signed-off-by: Shubhi Garg <shgarg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3142091
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
2024-05-23 01:54:36 -07:00
Jon Hunter
e9b64b08d1 net: nvethernet: Drop adjfreq support
The 'adjfine' method was first introduced in Linux v4.10 by commit
d8d263541913 ("ptp: Introduce a high resolution frequency adjustment
method.") and the 'adjfreq' method was finally removed in Linux v6.2.
Given that 'adjfine' has been supported since Linux v4.10, drop the
deprecated 'adjfreq' method completely to simplify the nvethernet
driver. This fixes build issues for 3rd party kernels that removed the
'adjfreq' method and are older than Linux v6.2.

Bug 3936429

Change-Id: I897bbd3ba92b11d8132c5762d2618b4e82ad44aa
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3128119
(cherry picked from commit 46af0c1d24)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3129149
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-05-02 04:09:19 -07:00
Brad Griffis
e9cdb435a3 net: ethernet: build realtek ethernet driver only for k5.15
Realtek does not support latest kernels with this driver.  Build it
only for k5.15.

Bug 4471899

Change-Id: Ic60b34f2c3d34d5642d8b568aae61339f6f15349
Signed-off-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3126899
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-05-01 09:55:23 -07:00
Shobek Attupurath
0313251d13 rtl8822ce: Initialize spinlock before usage
Issue: Kernel warning print observed from rtl8822ce module
    2024-04-23 21:04:14,547: [   42.507680] Call trace:
    2024-04-23 21:04:14,547: [   42.510201]  dump_backtrace+0xe0/0x140
    2024-04-23 21:04:14,547: [   42.514079]  show_stack+0x1c/0x30
    2024-04-23 21:04:14,547: [   42.517502]  dump_stack_lvl+0x64/0x84
    2024-04-23 21:04:14,648: [   42.521290]  dump_stack+0x14/0x34
    2024-04-23 21:04:14,648: [   42.524703]  spin_dump+0x98/0xb0
    2024-04-23 21:04:14,648: [   42.528030]  do_raw_spin_lock+0x110/0x130
    2024-04-23 21:04:14,648: [   42.532165]  _raw_spin_lock_irqsave+0x34/0xb0
    2024-04-23 21:04:14,648: [   42.536666]  rtl8822ce_reset_bd+0x50/0x334 [rtl8822ce]
    2024-04-23 21:04:14,648: [   42.542087]  rtw_hal_irp_reset+0x20/0x28 [rtl8822ce]
    2024-04-23 21:04:14,648: [   42.547290]  rtw_halmac_rx_agg_switch+0x728/0x9a8 [rtl8822ce]
    2024-04-23 21:04:14,648: [   42.553272]  rtw_halmac_dlfw+0x90/0xc0 [rtl8822ce]
    2024-04-23 21:04:14,648: [   42.558281]  rtl8822c_fw_dl+0x4c/0x17c [rtl8822ce]
    2024-04-23 21:04:14,648: [   42.563302]  rtw_hal_fw_dl+0x20/0x34 [rtl8822ce]
    2024-04-23 21:04:14,648: [   42.568136]  hal_read_mac_hidden_rpt+0x10c/0x32c [rtl8822ce]
    2024-04-23 21:04:14,648: [   42.574063]  rtl8822c_read_efuse+0x86c/0x1438 [rtl8822ce]
    2024-04-23 21:04:14,648: [   42.579726]  rtl8822ce_aspm_config_l1off+0x40c/0x998 [rtl8822ce]
    2024-04-23 21:04:14,648: [   42.586009]  rtw_hal_read_chip_info+0xc4/0xec [rtl8822ce]
    2024-04-23 21:04:14,648: [   42.591668]  rtw_pci_primary_adapter_init+0x13c/0xd4c0 [rtl8822ce]
    2024-04-23 21:04:14,648: [   42.598134]  rtw_pci_primary_adapter_init+0xd30/0xd4c0 [rtl8822ce]
    2024-04-23 21:04:14,648: [   42.604598]  local_pci_probe+0x44/0xd0
    2024-04-23 21:04:14,648: [   42.608500]  pci_device_probe+0xb0/0x270

Fix: Initialize the lock before using it

Bug 3414392

Change-Id: I82b6f00b4a3599665b1a7194b5785a785d11501a
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3123003
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-04-24 08:54:32 -07:00
Revanth Kumar Uppala
8b529ece8f rtl8822ce: Remove pr_debug redefinition
Issue: pr_debug is redfined to printk causing unwanted
       log prints in dmesg

Fix: Remove pr_debug redefintion in rtl8822ce driver

Bug 3844473

Change-Id: I4177f8c3fa245a881cd35c206f8d3caa4b811b32
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3121450
(cherry picked from commit 564ce2a709)
Reviewed-by: Amulya Yarlagadda <ayarlagadda@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3121447
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-04-24 08:54:27 -07:00
Jon Hunter
315ceb951b net: nvethernet: Fix build for Linux v6.9
For Linux v6.9, the structure 'ethtool_eee' was replaced by
'ethtool_keee' and this new structure uses bitmaps for the structure
fields 'supported', 'advertised' and 'lp_advertised' as opposed to
'u32' types.

Add a test to conftest to detect the presence of the new 'ethtool_keee'
structure and update the nvethernet driver to use the various
linkmode_xxx helper functions for accessing the bitmap structure fields.

Bug 4471899

Change-Id: I275becfa665a36ed90e8bc227eaa4122825faa6a
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3110494
(cherry picked from commit 72761b8276)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3111548
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-04-18 16:09:35 -07:00
Paritosh Dixit
91e87c9346 net: nvethernet: Fix build for Linux v6.9
In Linux v6.9-rc1, the typedef of skb_frag_t is updated to a new struct
skb_frag. Struct skb_frag does not include bv_offset and bv_page
members. Hence, use functions skb_frag_off and skb_frag_page to get
offset and page respectively. Use of functions skb_frag_off and
skb_frag_page is backward compatible with older kernel versions that
we use.

Bug 4471899

Signed-off-by: Paritosh Dixit <paritoshd@nvidia.com>
Change-Id: I5d14c750c5b4cd28a2abeda95d7c11bf975ef1b8
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3104114
(cherry picked from commit f451b88fd7)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3108315
Tested-by: Jon Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
2024-04-18 13:56:15 -07:00
Shobek Attupurath
4e544f3b3a rtl8822ce: Add Nvidia changes on v5.14.0.4-217
1. Add custom roam parameters
2. Add path for power file
3. Add source tree path for Makefile
4. Add section in Makefile for TEGRA platform
5. Update permissions from 0755 to 0644 for files
6. Move roaming debug prints to RTW_INFO

Bug 4320751
Bug 4556940
Bug 4568390

Change-Id: I842f150781652b3b54949aef8f982903c8d7991e
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Signed-off-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3108666
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2024-04-18 09:24:33 -07:00
Revanth Kumar Uppala
ed30eb40ff rtl8822ce: Fix TLP/EAPOL/TXFIFO issues
Issue: Observing the EAPOL packet after a second in 1/10 roams

       Observing TLP Malform packets on SC7

       Observing TXFIFO error when connected to serving AP

       Compilation errors for K6.x

Fix:   Add exact base driver released by realtek with EAPOL/TLP/TXFIFO
       fixes and also resolve some compilation errors.

DRIVERVERSION   v5.14.0.4-217-g7a0377e61.20240410_COEX20240327-2727_beta
BTCOEXVERSION   COEX20240327-2727

Bug 4320751
Bug 4556940
Bug 4568390

Change-Id: Ib02056ea388300dab2364b2bd6ceaf0a2096d3f4
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3115032
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Shobek Attupurath <sattupurath@nvidia.com>
Tested-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
2024-04-18 09:24:27 -07:00
Shobek Attupurath
9efa10a1d7 rtl8822ce: Move continuous prints to log INFO
Issue: As part of roaming, some debug prints are being continuously
       spewed on kernel logs

Fix: Move roaming debug prints RTW_INFO

Bug 4563642

Change-Id: I7ef8c78241fd6e6c9caf96357a6fb9a6c4b4a555
Signed-off-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3097074
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2024-03-15 11:54:20 -07:00
Aniruddha Paul
d01b6a3a2b nvethernet: Create pool per Rx DMA channel
Existing implementation uses a single page_pool
for all Rx DMA channels. As by default all irqs
are on CPU 0, this does not cause any issue.
Routing an irq to some other CPU causes race
conditon for page allocation from page_pool which
leads to random memory corruption.

[  158.416637] Call trace:
[  158.416644]  arm_lpae_map_pages+0xb4/0x1e0
[  158.416649]  arm_smmu_map_pages+0x8c/0x160
[  158.416661]  __iommu_map+0xf8/0x2b0
[  158.416677]  iommu_map_atomic+0x58/0xb0
[  158.416683]  __iommu_dma_map+0xac/0x150
[  158.416687]  iommu_dma_map_page+0xf4/0x220
[  158.416690]  dma_map_page_attrs+0x1e8/0x260
[  158.416727]  page_pool_dma_map+0x48/0xd0
[  158.416750]  __page_pool_alloc_pages_slow+0xc4/0x390
[  158.416757]  page_pool_alloc_pages+0x64/0x90
[  158.416762]  ether_padctrl_mii_rx_pins+0x164/0x9d0 [nvethernet]
[  158.416807]  ether_padctrl_mii_rx_pins+0x478/0x9d0 [nvethernet]
[  158.416822]  osi_process_rx_completions+0x284/0x4d0 [nvethernet]
[  158.416832]  0xffffa26218b8f71c
[  158.416855]  __napi_poll+0x48/0x230
[  158.416871]  net_rx_action+0xf4/0x290
[  158.416875]  __do_softirq+0x130/0x3e8
[  158.416889]  __irq_exit_rcu+0xe8/0x110

This change creates a page_pool per Rx DMA channel.
This ensures there is no race conditon for page
alloc/dealloc from each DMA napi context.

Bug 4541158

Change-Id: I12668ee7d824fd30d54a874bbbdf190d02943478
Signed-off-by: Aniruddha Paul <anpaul@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3093534
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
2024-03-14 03:54:09 -07:00
Shobek Attupurath
4a31d7ed61 rtl8822ce: Add Nvidia changes
1. Add custom roam parameters
2. Add path for power file
3. Add source tree path for Makefile
4. Add section in Makefile for TEGRA platform
5. Update permissions from 0755 to 0644 for files

Bug 4213654

Change-Id: Ib160d11285c093efe04fc5cb932b770585ad6bb3
Signed-off-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3079869
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-03-09 03:40:00 -08:00
Shobek Attupurath
e3673f6890 rtl8822ce: Add driver with roaming support
Issue: RTL8822CE driver doesn't have active roaming
       support and has issues with current roaming
       algorithm

Fix: Add driver with active roaming enabled and fixes
     issue with 5GHz and BT coex

DRIVERVERSION -
"v5.14.0.4-203-g4a9c85a0f.20240219_COEX20240125-2727_beta"
BTCOEXVERSION -
"COEX20240125-2727"

Bug 4213654

Change-Id: Icff3ece063518575fbcca3d8ea5be0b6314a567f
Signed-off-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3079863
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2024-03-09 03:39:54 -08:00
Jon Hunter
f9ed570c2b net: nvethernet: Prevent VM interrupts being balanced
If the userspace service 'irqbalance' is installed then the nvethernet
driver crashes when there is network activity. To avoid this crash set
the IRQF_NOBALANCING flash for the VM interrupts. No performance
degradation is observed when running iperf3 with a 1Gbps link.

Long-term the nvethernet driver still needs to be fixed to allow IRQ
balancing.

Bug 4293378
Bug 4541158

Change-Id: I0aa4ee28e36c7d273f14ff043544e72d3e988bd3
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3087525
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-03-04 07:24:12 -08:00
Jason Mei
bba1f3a464 net: ethernet: sync link status before removing
The tegera_tvnet driver usually built as kernel
module, to avoid rmmod/insmod cause kernel crash
sync link status before rmmod

Bug 4456727
Bug 4451567

Change-Id: I2b7227fef36688777b8a468678be9e63a7638c2c
Signed-off-by: Jason Mei <jianjunm@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3079867
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-25 21:40:04 -08:00
Jon Hunter
1ccb6edda2 drivers: Don't use strlcpy()
For Linux v6.8, the function strlcpy() has been removed. The function
strscpy() was added in Linux v4.3 and has been preferred over strlcpy().
See upstream Linux commit 30035e45753b ("string: provide strscpy()") for
more details. The Linux checkpatch.pl script warns against using
strlcpy().

The function strscpy() takes the same arguments as strlcpy(), but
returns a type of ssize_t instead of size_t. Update the drivers to use
strscpy() instead of strlcpy().

Bug 4448428

Change-Id: Id6f196f0e81decf1545f9aa4f74f5c63a7f72a48
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3059457
(cherry picked from commit ecf383265b)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3063000
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-25 13:55:01 -08:00
Jon Hunter
5d31085674 net: nvethernet: Fix build for Linux v6.8
The ethtool_ops function pointers get_rxfh and set_rxfh were updated for
Linux v6.8 to pass arguments via a new 'ethtool_rxfh_param' structure.
Add a new test for conftest to detect if the get_rxfh and set_rxfh
functions support the 'ethtool_rxfh_param' structure and update the
nvethernet driver accordingly for Linux v6.8.

Bug 4448428

Change-Id: Ia1c49d88c4ac73539454b010af92c261e14be4bf
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3037949
(cherry picked from commit 0356a563b3)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3055254
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-17 04:40:20 -08:00
Jon Hunter
069d6bb3eb drivers: Enable -Wmissing-prototypes
The compiler option -Wmissing-prototypes is being enabled globally in
the upstream Linux kernel and this causes build failures for various
drivers. The build failures occur because either the driver is missing
an include file which has the prototype or because the function is not
declared statically when it should be (ie. there are no external users).

Fix the various build failures and enable -Wmissing-prototypes to
prevent any new instances from occurring. Note that the only driver that
is not fixed at the moment is rtl8822ce due to large number of failures
and so build this with '-Wno-missing-prototypes' for now, which is not
different to how it was being compiled prior to this change.

Bug 4404965

Change-Id: Ie5572d23659e0346fa035d645d9043b0a6da5fdc
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3027488
(cherry picked from commit d5391a25ab)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3034644
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-18 09:11:10 -08:00
Laxman Dewangan
4a1a87890d pci: Use conftest to find if pci_enable_pcie_error_reporting() present
Use conftest to find if API pci_enable_pcie_error_reporting()
is present. This API is dropped from Linux 6.5 with change
commit 7ec4b34be42345 ("PCI/AER: Unexport
pci_enable_pcie_error_reporting()")

Bug 4346767

Change-Id: Ib0037544b4480b37c0ed6ac8b9ef9aef6ae82619
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028742
(cherry picked from commit bf46060d1e)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3032090
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
2023-12-12 03:39:54 -08:00
Jon Hunter
0940779cd6 net: hv-net: Remove driver source
The Tegra HV Net driver has been deprecated and so remove the source for
the driver.

Bug 3832837

Change-Id: I7eae6e92bf0c95e96ed4eca08b857105325f2238
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2867180
(cherry picked from commit 739b5f1c7b)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3031238
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-11 07:39:29 -08:00
Jon Hunter
7997b6e8b0 net: nvethernet: Use conftest for Linux v6.6
In Linux v6.6, the header net/page_pool.h was split into two headers;
net/page_pool/helper.h and net/page_pool/types.h. Use the conftest
script to detect which of these headers are present and generate compile
time definitions for including the appropriate headers.

Bug 4346767

Change-Id: I389ce5b867a1efd867b8392bb21383784c1b4af6
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3026553
(cherry picked from commit cd4dce2c20)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028310
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-05 09:24:31 -08:00
Shobek Attupurath
ee4493d7bf rtl8822ce: Remove pr_debug redefinition
Issue: pr_debug is redfined to printk causing unwanted
       log prints in dmesg

Fix: Remove pr_debug redefintion in rtl8822ce driver

Bug 3844473
Bug 4392253

Change-Id: I3aed85b8d61a764a74c59c2eef5f1f3dd60dd14a
Signed-off-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2813193
(cherry picked from commit 83a4b1f131209e357f80015fba386286f2888423)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2827187
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3024490
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-29 20:39:17 -08:00
Jon Hunter
067fbd7bbc net: nvethernet: Use conftest for Linux v6.3
Add tests to conftest for detecting if the mii_bus structure has the
read_c45 and write_c45 function pointers and use the definitions
generated by conftest in the nvethernet driver.

This fixes support for nvethernet in 3rd party Linux kernels that have
backported the mii_bus structure changes to their kernel that have a
kernel version prior to Linux v6.3.

Bug 4014315

Change-Id: I5ae98fc5077337286921da6e9347df9781565a70
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3018935
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-11-21 05:10:51 -08:00
Laxman Dewangan
f60f770721 net: Split type and declaration of page_pool in Linux 6.6.
Split the type and declaration of page_pool header for Linux6.6
based on below change from kernel 6.6:
---
commit a9ca9f9ceff382b58b488248f0c0da9e157f5d06
Author: Yunsheng Lin <linyunsheng@huawei.com>
Date:   Fri Aug 4 20:05:24 2023 +0200

    page_pool: split types and declarations from page_pool.h

---

Bug 4346767

Change-Id: I0217da34c67d952c97c6812c2760bed2fb3df3e0
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3008090
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-01 20:25:18 -07:00
Laxman Dewangan
ecf1a5a7a3 misc: Drop PCIE error reporting for Linux 6.6
Drop pcie error reporting call as it is not exported
on Linux 6.6.

---
commit 7ec4b34be4234599cf1241ef807cdb7c3636f6fe
Author: Bjorn Helgaas <bhelgaas@google.com>
Date:   Mon Jul 10 18:21:36 2023 -0500

    PCI/AER: Unexport pci_enable_pcie_error_reporting()

---

Bug 4346767

Change-Id: I0b8f924df1ac74c5f2b4973fb4a4d7f157d2c2cc
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3008089
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-01 20:25:13 -07:00
Jon Hunter
325bd67f86 drivers: prod: Fix kernel version checks
The new Tegra Prod APIs are to be used for NVIDIA Linux kernels v5.16+.
Building the MTTCAN and QUAD SPI driver currently fail for upstream
Linux v5.16 because the various version definitions are not correct.

Some definitions have greater than v5.16.0 instead of greater than OR
equal to v5.16.0. This means that the new APIs will only be used
starting with v5.16.1+ and not v5.16.0 as inteaded.

Other definitions have less than or equal to v5.16.0 instead of just
less than v5.16.0. This means that we will still use the legacy APIs for
v5.16.0.

Fix this by correcting the definition that the drivers can be built for
upstream Linux v5.16.

Bug 4097475

Change-Id: I7d8dd04911a7d6426c67e82396c8a6f1b372875d
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3006521
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-01 08:58:34 -07:00
Mohan Thadikamalla
e8d516daf3 nvethernet: Disable VLAN VID tag filters
Issue:
The L2 Orin bridge use case is encountered
an issue on AV+L NDAS builds for VLAN ping
from HOST1 to HOST2 over L2 Orin bridge.
As HOST1/HOST2 VLAN packets are dropped
by EQOS/MGBE MAC due to VLAN VID feature enable.

Fix:
To support the L2 Orin bridge VLAN
HOST1 to HOST2 data usecase, disable
the VLAN VID filters in the nvethernet driver.

Bug 4230250

Change-Id: I02514fcc15b7764fe93118a9f90c16716368c73c
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com>
(cherry picked from commit 86cb37f933846a012ba6d8cdac275a2edda0aa42)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3003075
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-10-30 23:39:22 -07:00
Jeremy Alves
b8fca78022 Lan743/6.1 include nvidia specific changes
Updating Lan7431 nvidia-oot driver for kernel 6.1
to include NV specific changes

Include changes from:
    https://git-master.nvidia.com/r/c/linux-nv-oot/+/2924162
    https://git-master.nvidia.com/r/c/linux-nv-oot/+/2932422
for userland phy and SC7 support

Bug 4330040
Bug 4270736

Change-Id: I20e052f24757d0ac17501906b267bc746c3d43d2
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3000975
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Jeremy Alves <jalves@nvidia.com>
Reviewed-by: Jeremy Alves <jalves@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2023-10-22 03:23:41 -07:00
Laxman Dewangan
9a65689ba2 mttcan: tegra: Add new prod setting support
Add new prod setting support which is the
property based on device tree. The prod
setting of each register field are new property
in DT and prod configurations are configured
via these new properties.

Bug 4097475

Change-Id: I86adc7b72a28802d73fee8a085db2bccf0d6d1cc
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2996771
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-10-14 05:56:30 -07:00
Revanth Kumar Uppala
9db9eb336c nvethernet: fix compilation error with k6.4.5
Fix compilation error while building nvethernet driver with k6.4.5

Bug 4221847

Change-Id: I0f7158949da7371135e4b483aea5a0fc4dc33890
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2990328
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-10-07 13:03:37 -07:00
Jon Hunter
ed130f099a net: nvethernet: Fix build for Linux v6.4
In Linux v6.4, commit
3948b05950fd ("net: introduce a config option to tweak MAX_SKB_FRAGS")
added a kernel config option for MAX_SKB_FRAGS and change the type of
the definition to integer. This causes the nvethernet driver build to
fail and the following errors are seen ...

 drivers/net/ethernet/nvidia/nvethernet/ether_linux.c:5949:33: error:
  format ‘%ld’ expects argument of type ‘long int’, but argument 4
  has type ‘nveu32_t’ {aka ‘unsigned int’} [-Werror=format=]
    "invalid tx-frames, must be inrange %d to %ld",
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 drivers/net/ethernet/nvidia/nvethernet/ethtool.c:950:28: error: format
  ‘%ld’ expects argument of type ‘long int’, but argument 4 has
  type ‘nveu32_t’ {aka ‘unsigned int’} [-Werror=format=]
    "invalid tx-frames, must be in the range of"
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fix this by changing the type in the respective prints to integer. Note
that his is also to make this change for kernel prior to Linux v6.4.

Bug 4183168
Bug 4221847

Change-Id: Ibd9160ad08e65e0b85cae1cf4903075c31a1cd77
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2989002
Reviewed-by: Shanker Donthineni <sdonthineni@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-10-05 04:37:24 -07:00
Jon Hunter
1c89d6b9cd net: r8168: Fix build for Linux v6.5
The r8168 driver fails to build with Linux v6.5 because the
skb_gso_segment() is not found ...

 drivers/net/ethernet/realtek/r8168_n.c:29231:24: error: implicit
  declaration of function ‘skb_gso_segment’; did you mean
  ‘skb_gso_reset’? [-Werror=implicit-function-declaration]
      segs = skb_gso_segment(skb, features);
             ^~~~~~~~~~~~~~~

Commit d457a0e329b0 ("net: move gso declarations and functions to their
own files") moved the definition to a new file 'net/gso.h'. Fix this by
updating the conftest Makefile to check for the presence of this header
file and use the definition generated by conftest accordingly in the
r8168 driver.

Bug 4221847

Change-Id: I6ad83a06602ef0679a76ff1a6e5ddabbcb1bfe00
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2990521
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-10-04 13:54:55 -07:00
Jon Hunter
ece68dd0d1 net: Use conftest
Instead of relying on kernel version to determine if functions or
specific versions of functions are present in the kernel, add compile
time tests to the conftest.sh script to determine this at compile time
for the kernel being used. This is beneficial for working with 3rd party
Linux kernels that may have back-ported upstream changes into their
kernel and so the kernel version checks do not work.

Bug 4119327

Change-Id: I79e701940ca70ca4d66500c75b5992f9d92b54b0
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2985744
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-10-03 04:01:15 -07:00
Jon Hunter
8409b7c652 net: can: mttcan: Make LED support depend on CAN_LEDS
CONFIG_CAN_LEDS has been marked as BROKEN since Linux v4.19 and was
finally removed in Linux v5.19. Only compile support for LEDS if enabled
in the kernel. Long-term we need to move the MTTCAN driver to use
LEDS_TRIGGER_NETDEV.

This is a better solution for working with 3rd party Linux kernels that
may backport upstream changes to the kernel and hence are not compatible
with these existing version checks.

Bug 4228080
Bug 4283911

Change-Id: I70e800c4a3699af59742d30111bc3a3cbf80bcb5
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2982135
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-21 13:11:36 -07:00
Jon Hunter
8f976ab022 net: can: mttcan: Drop unnecessary version checks
GPIO descriptor support has been supported in the Linux kernel since
v3.16. Therefore, simplify the MTTCAN driver by removing the legacy GPIO
support and only use GPIO descriptors.

Bug 4119327
Bug 4228080

Change-Id: Ib1c50d17c514dee6a5c69145a8f5d3e07b5b3855
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2981396
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-19 21:11:29 -07:00
Shobek Attupurath
4ae0f1a759 rtl8822ce: Remove unwanted prints
Issue: Realtek driver has unwanted kernel prints being dumped in
       kernel logs

Fix: Remove unwanted kernel prints and move necesary prints to
     debug

Bug 4273483

Change-Id: I0a7b0d15e9456f6bcf296cd24fe758950cc64888
Signed-off-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2977367
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2023-09-19 21:09:43 -07:00
Revanth Kumar Uppala
7a01b01e88 nvethernet: Resolve "Wframe-larger-than" warning
-Use dynamic structure pointer to eliminate
"Wframe-larger-than" warning.

-Modify "-Wframe-larger-than" flag from 4096 bytes to 2048 bytes

Bug 4213870

Change-Id: I9dc3df951290415ce587b1fe2440ee52dd985b62
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2954775
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-09-06 05:20:02 -07:00
Jian-Min Liu
719d3fa024 nvidia-oot: use TEGRA_SYSTEM_TYPE_ACK as ack macro
Use config TEGRA_SYSTEM_TYPE_ACK to control kernel builds only
base on the system type which also aliged to Makefile use.

Bug 4223187

Change-Id: I276208d180d1b3459eccb80d8fdb818f4507d3df
Signed-off-by: Jian-Min Liu <jianminl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2966713
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-24 23:32:04 -07:00
Revanth Kumar Uppala
37b53e8d72 r8168: update driver to 8.051.02.10m_pll
- Update realtek r8168 driver version to 8.051.02.10m_pll
- This update disables 10M EEE

Bug 4205197

Change-Id: I0d20a2d6061e108192a3066965aff94e8a463ca5
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2962412
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-23 11:17:30 -07:00
Mahesh Patil
6883238a21 nvethernet: Fix coverity "unused value"
Bug 3952896

Change-Id: Ie30c3da4d0979f664cb3c951794e905b52e5c005
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2952208
Reviewed-by: Nagaraj Annaiah <nannaiah@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2023-08-17 20:16:21 -07:00
Sushil Kumar Singh
8fc898d1ec nvethernet: assign macsec private data to NULL
Issue:
L4T platforms on boot comes up with MTU as 1500.
However on changing the MTU to jumbo, the final
MTU which gets set accounts the MACSEC ICV tag
len and reduces the MTU by 34 bytes even though
the platform does not support MACSEC.

Fix:
Assign macsec allocated private data to NULL and
use the NULL check in ndo mtu change ioctl call
to reject MTU reduction if macsec is not supported.

Bug 4137597

Change-Id: Ica3003b54762dd5d240c9b0c5c012049b4e503b2
Signed-off-by: Sushil Kumar Singh <sushilkumars@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2928569
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Tested-by: Revanth Kumar Uppala <ruppala@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-04 13:57:42 -07:00
Jon Hunter
44443da0bb net: realtek: Fix build for Linux v6.1+
Upstream Linux kernel commit b48b89f9c189 ("net: drop the weight
argument from netif_napi_add") removes the weight argument from the
netif_napi_add() function and this is breaking the build of a few
drivers that use this function. Fix this by updating these drivers
to use the netif_napi_add_weight() function instead for Linux v6.1.

Finally, allow building the realtek wireless driver for kernels other
than v5.15 so that we can ensure it will build against other kernel
versions.

Bug 3750163

Change-Id: If179d044c00bfa83c9902973c642717263d9e3de
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2942057
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-02 14:05:18 -07:00
Sushil Kumar Singh
0f0dc2e6c1 nvethernet: Cancel set speed workqueue on SC7 entry
set speed work function is not cancelled on system suspend
fix this by cancelling the work queue function

Bug 4167378

Change-Id: I2c065011a830470f690441b2c841893479b361fb
Signed-off-by: Sushil Kumar Singh <sushilkumars@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2921347
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-07-28 13:16:35 -07:00
Revanth Kumar Uppala
4c0d72dba6 nvethernet: Fix coverity defect
Issue:
Assigning value 0 to ret, but that stored value is overwritten
before it can be used.

Fix:
Remove unused assignment to ret

CID: 10166550

Bug 3952896

Change-Id: Ieb877e618ca252c218b338682ca02d44096c7a47
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2942165
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-27 18:42:20 -07:00