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>
In Linux v6.10, the 'class' argument was removed from the
i2c_mux_add_adapter() function. Add a test to conftest to detect the
correct number of arguments for i2c_mux_add_adapter() and update the
virtual-i2c-mux driver accordingly to fix the build for Linux v6.10.
Bug 4593750
Change-Id: I7333a511b487b7c2f2fa0ce7c34f2df5f061fbe4
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3142398
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
In Linux v6.10, a pointer to a dynamically allocated 'struct device'
was replaced with a statically allocated 'struct device' in the
'pwm_chip' structure. Update the Tegra camera drivers accordingly to fix
the build for Linux v6.10.
Bug 4593750
Change-Id: I05e15e2a63383ab2f96be6c20e81705de9581869
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3123220
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
In Linux v6.10, a pointer to a dynamically allocated 'struct device'
was replaced with a statically allocated 'struct device' in the
'pwm_chip' structure. Update the Tegra PWM Tachometer driver accordingly
to fix the build for Linux v6.10.
Bug 4593750
Change-Id: I9d629746290282b5c1858f8308128d94ff155c49
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3123219
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
The function blk_queue_max_hw_sectors() was removed in Linux v6.10 and
so add a test to conftest to see if this function is present or not to
allow the driver to build. The virtual-storage driver is currently
broken for Linux v5.19+ kernel due to other incompatibilities with these
newer kernels, but has been updated so that it still builds. Therefore,
allow the driver to build for Linux v6.10 while the driver is fixed
properly for these newer kernels.
Bug 4311184
Bug 4593750
Change-Id: Ic4054c87acdf3c77f03ff94fbdde513d84fe229b
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3142216
(cherry picked from commit c73cf3c92a)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3142204
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Some of the conftest tests are no longer working with the mainline
kernel and this is causing various build failures for drivers. Upstream
commit a3b00f10da80 ("objpool: enable inlining objpool_push() and
objpool_pop() operations") inlined some code that causes build error to
occur when the tests are built with 'Werror=address-of-packed-member'.
Upstream commit 6f303d60534c ("gcc-9: silence 'address-of-packed-member'
warning") disables the option 'address-of-packed-member' for the kernel
already and so fix these new build failures by disabling this option
for the conftest tests.
Bug 4593750
Change-Id: I37af97079bb7734fcd5bf10384b1afc071613594
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3142214
(cherry picked from commit 1a635bb0ea)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3142203
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
In Linux v6.10 the nv-virtio-poc driver fails to build and the following
error is seen ...
drivers/nv-virtio/nv-virtio-console-poc.c:277:13:
error: implicit declaration of function 'remap_pfn_range';
did you mean 'vmap_page_range'? [-Werror=implicit-function-declaration]
277 | if (remap_pfn_range(vma, vma->vm_start, ipa_pfn,
| ^~~~~~~~~~~~~~~
| vmap_page_range
Upstream commit 22bcc915ae91 ("kfifo: don't use "proxy" headers")
updated some kernel headers to only 'include what is used' and exposed
that the nv-virtio-poc driver is not explicitly including 'linux/mm.h'.
The function remap_pfn_range() has been defined in 'linux/mm.h' since
Linux v2.6 and so fix this by always including 'linux/mm.h'.
Bug 4593750
Change-Id: Ic43b22ca51bbc16e2085d146d28e40c21206ae2f
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3142213
(cherry picked from commit ef52cefdda)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3142202
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Upstream commit 690da22dbfa8 ("asm-generic/io.h: kill vmalloc.h
dependency") removed the vmalloc.h header file from io.h and this breaks
building various drivers with the latest -next kernels. Fix this
by ensuring vmalloc.h is included and in most cases slab is not actually
needed and so remove this where possible. Note that it is fine to make
this change for all current supported kernels.
Bug 4593750
Change-Id: I003d1302bda226d356467e6ede99949b2716940a
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3141984
(cherry picked from commit cb8b9f5a53)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3123218
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
[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>
In Linux v6.10, commit b1ae92dcfa8e ("thermal: core: Make struct
thermal_zone_device definition internal") made the structure
'thermal_zone_device' internal and so the 'devdata' member is no longer
directly accessible. The function thermal_zone_device_priv() was added
in Linux v6.4 for retrieving the 'devdata' and so update the various
thermal drivers to use this function if present.
Bug 4593750
Change-Id: Ic53de9bbd5459c99a3ac26759aa8a966cd775fe5
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3123221
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
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>
There are several build issues observed in pci-epf-tegra-vnet.c
when building against mainline.
These errors pertain to the following previous commits:
* Use conftest to find if pci_epc_event_ops struct has core_deinit.
* pci: Use conftest to find if probe of pci_epf_driver has ID arg
* misc: nvscic2c-pcie: Drop usage of enum pci_epc_irq_type from Linux 6.8
The pci-epf-tegra-vnet.c is recently added and needs to use those
same new conftest capabilities.
Bug 4346767
Change-Id: I4ea66524513cdc4d62607a061c3f253e2a3cee2b
Signed-off-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3128608
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Building the PCI EPF DMA test driver for Linux v6.9 is failing because
the parameters for the pci_epf_alloc_space() function has been updated
to pass the alignment value via the 'pci_epc_features' structure instead
of passing the value directly.
Instead of hard-coding the endpoint alignment in the EPF DMA test driver
use the 'pcie_epc_get_features()' function to retrieve the endpoint
features structure which has the endpoint alignment.
By using the conftest script to detect the parameters for the
pci_epf_alloc_space() function, we can then pass the appropriate
arguments to the pci_epf_alloc_space() function.
Bug 4471899
Change-Id: Id80259a4c90d6f6ae2132cccbec1a96113d22be7
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3116548
(cherry picked from commit 971680aadb)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3128431
Tested-by: Brad Griffis <bgriffis@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
The following error is observed when PCIE EP is enabled:
drivers/misc/nvscic2c-pcie/stream-extensions.c:766:23: error: implicit
declaration of function ‘platform_get_drvdata’
Include the appropriate file.
Bug 4456727
Bug 4451567
Change-Id: I46aab2fbd01142b9eb3a5a5d665465c115ddeb47
Signed-off-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3128579
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
The following error is observed when PCIE EP is enabled:
drivers/misc/nvscic2c-pcie/pci-client.c:766:24: error: implicit
conversion from ‘enum peer_cpu_t’ to ‘enum drv_mode_t’
[-Werror=enum-conversion]
Cast the return value to avoid the error.
Bug 4456727
Bug 4451567
Change-Id: Ie11b8231ed65771aaf1f91ff12f9c7bf104f8b2c
Signed-off-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3128564
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
There is additional argument added in iommu_map() from Linux v6.3.
Pass the proper argument from the driver who are using this
APIs. Using conftest methods for differentiating whether
additional argument is needed or not.
Bug 4374520
Change-Id: I3d6452cf6c71f495e3b6e3b240b2c2d839aa4b0d
Signed-off-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3128547
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
When the tsec driver is built with the compiler flag
-Werror=old-style-declaration the following error is observed ...
error: 'static' is not at beginning of declaration
[-Werror=old-style-declaration]
393 | const static struct dev_pm_ops tsec_module_pm_ops = {
| ^~~~~
This is observed with the latest linux-next kernels, but could be
observed with any kernel where this flag is set. Fix this by ensuring
that the 'static' keyword is declared first.
Bug 4593750
Change-Id: Ia635188569d827d361bd36f7be943fbf9f1f0a60
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3126898
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
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>
Commit c1fa617caeb0 ("tracing: Rework __assign_str() and __string() to
not duplicate getting the string") update the __assign_str() function
and dropped the trailing semi-colon from the definition. This is causing
the NVMAP driver build to fail because of a missing semi-colon on some
of the __assign_str() declarations in the nvmap.h header. Some already
have a semi-colon and so fix this by populating a semi-colon for the
ones that are missing. Note that there is no harm in having multiple
semi-colons for kernels that define __assign_str() already with a
trailing semi-colon.
Bug 4471899
Change-Id: Ic804ca0ce1480f830ec3f6b5636e099b00734857
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
(cherry picked from commit 6b355b554a)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3119066
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Paritosh Dixit <paritoshd@nvidia.com>
For Linux v6.9 the compatibility layer that existed for transitioning
SPI drivers from using the legacy 'master' based naming to the
'controller' based naming for functions, structures and variables has
been removed. This is causing the various SPI driver build failures.
The compatibility layer was first introduced in Linux v4.13 by commit
8caab75fd2c2 ("spi: Generalize SPI "master" to "controller"") and given
that the newer "controller" based naming works for kernels from v4.13,
update the various SPI drivers to use the new naming for all current
supported kernels.
Bug 4471899
Change-Id: I5d9fcc429ab4262eb2827b61eb5aec729059f4b5
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3109504
(cherry picked from commit 4432f3b652)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3111546
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
The conftest test for detecting if the definition SLAB_MEM_SPREAD is
present is not working as expected because it is using the 'functions'
type which is intended for only checking if a function is present or
not. Fix this by correcting the type to 'types'.
Bug 4471899
Change-Id: Iba3c9fe70a97793576d9f188d50628acb55f44df
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
(cherry picked from commit b8b92d5d5f)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3111545
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
In Linux v6.9 the data argument of the function pointer passed to
gpio_device_find() was updated to be a const type. This breaks building
the CDI and ISC drivers for Linux v6.9. Update the test in conftest that
detects the presence of the gpio_device_find() function to perform a
second test to see if the argument for the function pointer is a const
type. Update the drivers that use the gpio_device_find() function
accordingly to fix the build.
Bug 4471899
Change-Id: I562451a401bcaebcf0acf9a7d563cb0ea1d87807
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3104559
(cherry picked from commit 037fa78728)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3104651
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
When adding conftest tests for detecting if specific functions are
present, it is always better to check if the newly added function is
present versus the function that has been removed. The reason being that
is the newly added function is modified in the future then the conftest
tests can be extended to check for updates to the function.
Therefore, instead of checking if the function gpiochip_find() is
present, which was removed in Linux v6.7, check if the function
gpio_device_find() is present, which replaced gpiochip_find in Linux
v6.7.
Bug 4346767
Bug 4471899
Change-Id: I32bf1c3da32abbf3c8d3ef9ea350decf1564e0bc
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
(cherry picked from commit 68e7840dd8)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3111544
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
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>
When booting kernels that have both the upstream and out-of-tree audio
drivers for Tegra present the following errors are observed ...
Error: Driver 'tegra210-ahub' is already registered, aborting...
Error: Driver 'tegra210-amx' is already registered, aborting...
Error: Driver 'tegra186-dspk' is already registered, aborting...
Error: Driver 'tegra210-mvc' is already registered, aborting...
Error: Driver 'tegra210-adx' is already registered, aborting...
Error: Driver 'tegra210-ahub' is already registered, aborting...
Error: Driver 'tegra210_mixer' is already registered, aborting...
Error: Driver 'tegra186-asrc' is already registered, aborting...
Error: Driver 'tegra210-dmic' is already registered, aborting...
Error: Driver 'tegra210-i2s' is already registered, aborting...
Error: Driver 'tegra210-admaif' is already registered, aborting...
The problem is that the upstream Tegra audio drivers are loaded first
and then the kernel attempts to load the out-of-tree variants because
they have a different name. The out-of-tree are installed under the
'updates' directory in the file-system and by dropping the 'oot' suffix
from the driver name, then depmod will not attempt to load both variants
of the audio drivers and prioritise loading the drivers in the 'updates'
directory.
Bug 4590647
Change-Id: I6c6fe1eb84bc9fdfa4a8f4abf1ce3a75f3bfba8a
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3110266
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Building the NVPPS driver with Linux v6.9-rc1 is failing with the
following error ...
drivers/nvpps/ptp-notifier.c:125:69:
error: invalid use of undefined type 'const struct device_node'
Add the header file of.h to fix this build issue.
Bug 3826818
Bug 4471899
Change-Id: I0eb23e3556ec280447e3d2c499afc11daad601a0
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3104379
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Paritosh Dixit <paritoshd@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>