We cannot use enum definitions in '#if defined()' statements because the
'#if defined()' is a preprocessor macro that is evaluated prior to
compilation. Fix this by adding a test to conftest to detect if
CMD_PCIE_RP_CONTROLLER_OFF is defined.
Bug 5551652
Change-Id: I71826a58e428f1a335e8e0d895f25f3cea46a65e
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3467641
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Prakhar Srivastava (SW-TEGRA) <prasrivastav@nvidia.com>
Upstream commit a55893133830 ("gpiolib: Remove unused
devm_gpio_request()") removed the devm_gpio_request() function and this
breaks the Tegra USS IO Proxy driver. The devm_gpiod_get() function has
been supported in the Linux kernel since v4.3 and now that the legacy
GPIO functions are being removed, migrate the Tegra USS IO Proxy driver
over to using GPIO descriptors.
Bug 4387902
Bug 5420210
Change-Id: I0c62977dc4ec829e14f105babdd08bbd64113fa2
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3423827
(cherry picked from commit e4572a5ff434f778178b1dfb39b4c1cf7923db6d)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3462463
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Currently the wakeup source is configured if only the 'ext_wake' is
valid. However, the bluedroid_pm_timer and proc interface that are
configured when 'ext_wake' is valid, also assumes that 'host_wake' is
also valid. Therefore, update the code to only configure the
bluedroid_pm_timer and proc interface if both of these are valid.
Bug 4958861
Change-Id: I16ef55359c36acc9dc50464f43816ae2ef3c3123
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3397252
(cherry picked from commit b1e18d66aa0ab6d491b88caac5fa9abddb69d0e4)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3462461
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
The structure returned from the function wakeup_source_register() is not
currently checked to see that a valid structure is returned. If
wakeup_source_register fails to register the wake-up source, then this
function will return a NULL pointer and this will lead to a crash when
defereferencing this pointer. Therefore, check that a valid structure is
returned from wakeup_source_register() and if not then return an error
from the probe function.
JIRA LINQPJ14-60
Bug 4958861
Change-Id: I03356700ab03d6c25080b3806ea8b7da3983a302
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3394894
(cherry picked from commit 14286052fb9dd496b243221fa1066f828451b294)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3405519
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
The function devm_gpiod_get_optional() will return an error code encoded
as a pointer type if the GPIO requested is not found. Therefore, we need
to use the IS_ERR() macro to determine if the GPIO is valid, otherwise
we could incorrectly attempt to dereference an invalid pointer. This bug
was introduced when migrating the bluedroid driver to use the gpiod
functions.
Bug 4387902
Bug 4958861
Change-Id: Ib9e7494c92226454d93506c2c0d4c80bd6a7493c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3397231
(cherry picked from commit b461fa1a87f9beb5faa1dc917956603430b12df7)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3405518
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
There are 2 timer defined. One statically and one in the
bluedroid_pm_data struct. Both timers call the same function on expiration. In the case of the statically defined timer this is a problem because it assumes that the timer is part of the bluedroid_pm_data and so calling timer_container_of() or from_timer() results in an invalid pointer and hence kernel panic. Fix this by
removing the statically defined timer.
Bug 4958861
Change-Id: I08f9dc3a032f84ca3350fbec5fb97062da8d6795
Signed-off-by: Bruce Xu <brucex@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3400991
(cherry picked from commit 61490c6a2a65e24068cd33a92d8730260ad83f95)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3405517
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
In Linux v6.16, the 'of_node' structure was removed from the
'i2c_board_info' structure and the 'cdi-mgr' driver fails to build.
Although it is possible to detect whether the 'i2c_board_info' structure
has the 'of_node' structure using conftest, the 'cdi-mgr' driver does
not even use this. Therefore, it is simpler to fix this by using memset
and strncpy to initialize the 'i2c_board_info' structure and this also
aligns the camera 'cdi-mgr' driver with the camera 'isc-mgr' driver that
initializes the 'i2c_board_info' structure in this way.
JIRA LINQPJ14-60
Change-Id: I1d9df0fb1ccea3d303f256f65d187a131b7352ad
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3374654
(cherry picked from commit 30cad15a2e832ad445003911a76627fb18f91b49)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3461876
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
In Linux v6.16, the structure 'data_bittiming_params' was added to the
'can_priv' structure and all the related data bittiming parameters were
moved under this new structure. Add a test to conftest to determine if
this new structure is present and update the Tegra MTTCAN driver
accordingly.
JIRA LINQPJ14-60
Change-Id: Ibd8f6bd81a903b15a55d837023dada835a1e72ca
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3374645
(cherry picked from commit 86396ec47b78a7716a5faa8d492d74efc7f23dce)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3461874
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
In Linux v6.16, commit 41cb08555c41 ("treewide, timers: Rename
from_timer() to timer_container_of()") renamed 'from_timer()' to
'timer_container_of()'. Given that this is a macro we can simplfy see if
the macro 'timer_container_of' is defined and if so use this otherwise
fall back to 'from_timer()'. Update the necessary drivers to fix the
build for Linux v6.16.
JIRA LINQPJ14-60
Change-Id: I7f622b5d046a92da2ade755e6a697c1810f61275
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3383387
(cherry picked from commit 320ec84efd492c0c2711c69104fabc30b4f15ecb)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3461850
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
When NV_TEGRA264_BWMGR_DEBUG_MACRO_PRESENT is not defined the build
fails and the following errors are seen ...
drivers/platform/tegra/tegra-bpmp-bwmgr.c:101:12: error:
‘tegra_bpmp_bwmgr_devfreq_target’ defined but not used
[-Werror=unused-function]
101 | static int tegra_bpmp_bwmgr_devfreq_target(struct device *dev,
unsigned long *freq, u32 flags)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/platform/tegra/tegra-bpmp-bwmgr.c:37:12: error:
‘tegra_bpmp_bwmgr_max_freq_notifier’ defined but not used
[-Werror=unused-function]
37 | static int tegra_bpmp_bwmgr_max_freq_notifier(struct
notifier_block *nb, unsigned long action, void *ptr)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fix this by ensuring the above functions are not defined if
NV_TEGRA264_BWMGR_DEBUG_MACRO_PRESENT is not defined.
Bug 5483386
Bug 5196455
Change-Id: Ie2b069d163a32220c95ffaba217ddea3686ba92b
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3461865
Reviewed-by: Johnny Liu <johnliu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This driver exposes EMC frequency control interface to user space via
linux devfreq framework.
Users could change EMC frequency to the frequency value from the
available frequencies of EMC clock:
$ /sys/class/devfreq/bwmgr# cat available_frequencies
665600000 2750000000 3200000000 4266000000
and update the EMC floor frequency by writing into the min_freq QoS
sysfs node:
$ /sys/class/devfreq/bwmgr# echo 4266000000 > min_freq
and update the EMC max frequency by writing into the max_rate QoS
sysfs node to cap the EMC frequency:
$ /sys/class/devfreq/bwmgr# echo 4266000000 > max_freq
This driver does not directly manage the EMC clock rate. Instead it
just delivers the min/max frequency information to BPMP, and BPMP is
still the only entity that has the full control of EMC and other
related memory clocks.
Bug 5483386
Bug 5196455
Change-Id: I6124eeb7411a13bde5c51582064534063abca8d3
Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3453755
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Rajkumar Kasirajan <rkasirajan@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
----------------------------------
rtl8852ce release notes for Nvidia
----------------------------------
v1.19.16_nv-126-16-gbf1934e39.20250910_Certified_Module_beta
* fix scan issue in roaming test
==================================================================
v1.19.16_nv-126-15-ge5204803f.20250827_Certified_Module_beta
* Fix bug of 802.11d CC scan mechanism
[Description]
The 11d CC scan result may sometimes be overwritten by other scans.
==================================================================
v1.19.16_nv-126-14-g196875f8d.20250821_Certified_Module_beta
* fix 6G MBSSID disconnect problem
[Description]
Fix the issue where RSSI was not updated in non-transmitted BSSID, which could
cause disconnection due to incorrect RSSI values.
==================================================================
v1.19.16_nv-126-13-g7a2b96406.20250813_Certified_Module_beta
* fix 6G Enhanced open mode not work
[Description]
(1) Parse capabilities in MBSSID
e.g. Vendor Specific OUI WMM IE
Non-Inheritance IE
(2) Handle MBSSID sets
(3) Adjust MAX IE size from 768 to 1840 defined in WIFI Alliance
Bug 5422314
Bug 5226667
Change-Id: I63802c34fdc6e189566843d11992ff64b8e404fa
Signed-off-by: Narayana Reddy P <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3450784
Reviewed-by: Shobek Attupurath <sattupurath@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Account NvMap allocated memory into both RSS and CG tracking to make
efficient OOM kill decisions during memory pressure.
NvMap allocates memory via kernel APIs like alloc_pages, the kernel
memory is not accounted on behalf of process who requests the
allocation. Hence in case OOM, the OOM killer never kills the process
who has allocated memory via NvMap even though this process might be
holding most of the memory.
Solve this issue using following approach:
- Use __GFP_ACCOUNT and __GFP_NORETRY flag
- __GFP_NORETRY will not let the current allocation flow to go into OOM
path, so that it will never trigger OOM.
- __GFP_ACCOUNT causes the allocation to be accounted to kmemcg. So any
allocation done by NvMap will be definitely accounted to kmemcg and
cgroups can be used to define memory limits.
- Add RSS counting for the process which allocates by NvMap, so that OOM
score for that process will get updated and OOM killer can pick this
process based upon the OOM score.
- Every process that has a reference to NvMap Handle would have the
memory size accounted into its RSS. On releasing the reference to
handle, the RSS would be reduced.
Bug 5222690
Change-Id: I3fa9b76ec9fc8d7f805111cb96e11e2ab1db42ce
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3447072
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Ajay Nandakumar Mannargudi <anandakumarm@nvidia.com>
The camera-diagnostic driver is missing a release function for the IVC
channel device that it is creating. This causes the following WARNING to
be observed when probing the camera-diagnostic driver fails ...
------------[ cut here ]------------
Device 'camera-diag' does not have a release() function, it is broken
and must be fixed. See Documentation/core-api/kobject.rst.
WARNING: CPU: 8 PID: 756 at drivers/base/core.c:2517 device_release+0x88/0xa8
...
Call trace:
device_release+0x88/0xa8
kobject_put+0xac/0x150
put_device+0x14/0x34
__mod_of__camera_diag_of_match_device_table+0x602514/0x6033a0
[camera_diagnostics]
tegra_ivc_bus_boot_sync+0x204/0x28c [ivc_bus]
really_probe+0x150/0x2c8
__driver_probe_device+0x78/0x134
driver_probe_device+0x3c/0x164
__driver_attach+0x98/0x1c4
bus_for_each_dev+0x7c/0xf4
driver_attach+0x24/0x38
bus_add_driver+0xec/0x218
driver_register+0x5c/0x13c
tegra_ivc_driver_register+0x10/0x1c [ivc_bus]
init_module+0x18/0x1000
[camera_diagnostics]
do_one_initcall+0x58/0x318
do_init_module+0x58/0x1ec
load_module+0x1f04/0x2000
init_module_from_file+0x88/0xd4
__arm64_sys_finit_module+0x148/0x330
invoke_syscall+0x48/0x134
el0_svc_common.constprop.0+0x40/0xf0
do_el0_svc+0x1c/0x30
el0_svc+0x30/0xb8
el0t_64_sync_handler+0x130/0x13c
el0t_64_sync+0x194/0x198
---[ end trace 0000000000000000 ]---
Ideally we would use the 'tegra_ivc_channel_release()' function as the
release function but because the camera-diagnostic driver does not call
'tegra_ivc_channel_create()' to create the channel and does not actually
need to free any memory, simply define a new empty function that can be
called.
Bug 5489551
Change-Id: I6a7de9893af0167409af79599b61faf005047b0e
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3443095
(cherry picked from commit f75c0f228ca4f1a4c17266cb97be2db63b25a592)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3453753
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
A function called hrtimer_setup() was added in Linux v6.13 with the
intent that it would eventually replace hrtimer_init(). In Linux v6.15
the hrtimer_init() function was removed.
Use conftest to call the appropriate API based on what is defined
in the kernel.
Bug 5466808
Change-Id: I1c1c4e81c840a058d8c4c0b1616c87cb8a8a8beb
Signed-off-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3436079
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
The 'no_llseek' definition was removed in Linux v6.12. Use
NV_NO_LLSEEK_PRESENT to check if it should be defined.
The 'remove' callback of the 'platform_driver" structure was updated in
Linux v6.11 to return void instead of int.
Update rtcpu-coe.c so that it properly handles the above cases.
Bug 5466808
Change-Id: I9306840f0b4a9e5a59a5c161ac3c58af2a70a4ed
Signed-off-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3436078
Reviewed-by: Igor Mitsyanko <imitsyanko@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Issue - When WiFi operating channel is switched, at times the wifi
role index and role bitmap show that there is already a role
assigned for the channel context and this causes a failure in association. Kernel warning is shown when this occurs.
Fix - Update driver to v126-10 that fixes this issue.
[ 57.590860] Call trace:
[ 57.590861] rtw_phl_chanctx_add+0x528/0x8f4 [rtl8852ce]
[ 57.590947] rtw_clear_is_accepted_status+0x4a4/0xbb8 [rtl8852ce]
[ 57.591033] cur_req_hdl+0x3c/0x4c [rtl8852ce]
[ 57.591118] msg_dispatch+0x2dc/0x3f8 [rtl8852ce]
[ 57.591204] dispr_thread_loop_hdl+0x270/0x2dc [rtl8852ce]
[ 57.591289] dispr_share_thread_loop_hdl+0x10/0x1c [rtl8852ce]
[ 57.591374] share_thread_hdl+0xb8/0x1a0 [rtl8852ce]
[ 57.591459] kthread+0x110/0x124
[ 57.591466] ret_from_fork+0x10/0x20
Bug 5440351
Bug 5442104
Change-Id: Ie78c70c1ea7a789351a2ba4ad445c4d0062281da
Signed-off-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3426784
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
OpenRM maps the buffer with remap_pfn_range and then it's user VA is
passed to libnvrm_mem to create a handle out of it. NvMap uses
get_user_pages to get user pages from the VA. It fails for the buffer
mapped with remap_pfn_range. Then it fallbacks to follow_pfn or
follow_pfnmap_start functions to obtain pfn from the VA and then obtain
page pointer from it. But as get_user_pages fails, the corresponding
error prints are getting generated even when not required. Hence reduce
the log level to debug to avoid these unnecessary spews.
Bug 5383624
Change-Id: Idbd3cfe93ce3fac6e27efc5c3bb7a200fc183d26
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3425552
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Problem:
- When a Downstream Port Containment (DPC) software trigger is issued, the LTR_EN bit in the Root Port (RP) is cleared as per PCIe spec.
- However, LTR_EN bit of RTL8126 endpoint (EP) which is being expected to reset is still active and sends Latency Tolerance Reports (LTR) to RP.
- This behavior violates the PCIe spec, as LTR_EN is a non-sticky bit and should be cleared automatically on reset.
- As the RP has LTR disabled but the EP still sends LTR messages, it results in Unsupported Request (UR) errors on the RP.
- These UR errors trigger AER (Advanced Error Reporting) recovery, which includes a Secondary Bus Reset (SBR).
- The SBR causes the PCIe link to go down and come back up, but the EP again starts sending LTRs, leading to a infinite error-recovery loop.
Workaround:
- As a temporary fix, disable the LTR_EN bit in the RTL8126 EP during its probe.
- This prevents the EP from sending LTR messages, thereby avoiding UR errors and breaking the loop of AER recovery.
Impact:
- Disabling LTR prevents the EP from entering the L1.2 low power state.
- However, ASPM is currently not enabled in the system, so this workaround has no impact.
Bug 4869463
Change-Id: Ibf7effaeb0f22e952645ef7bf6a18287264e1463
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3420019
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
In fringe unexpected cases, HSB (Holoscan sensor bringe) sends image
byte offset larger then allocated image size (e.g. if HSB just sends
incorrect packet, or is configured incorrectly for a different image
size. or just packet corruption).
In such cases, we run into SMMU faults.
To mitigate this, a buffer size of two check was introduced so even
were this to happen, it would not cause SMMU errors.
However, the support for this in UMD is not complete.
Therefore, disable this check until UMD is able to comply with this
buffer constraint.
Jira L4T-7463
Change-Id: I2de31740284627ca117f1fa0a28bde2ef9a82785
Signed-off-by: Rakibul Hassan <rakibulh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3419644
Reviewed-by: Igor Mitsyanko <imitsyanko@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>