Below race condition can happen during boot
1) Server calls sivc_reset()
2) Storage client driver has IVC event handler registered, so it gets the event
and it calls ivc_notified()
3) Server gets ivc event, it calls ivc_notified()
( this makes server local state to established )
4) Storage cliend driver also goes to established state
5) After this, storage client driver continued with probe() and
calls ivc_reset() which results in disconnecting the
already established connection.
To fix this race condition, perform ivc_reset in storage client
driver right after tegra_hv_ivc_reserve() before registering
the IVC IRQ handler.
Bug 4125055
Change-Id: I36e6db3479f34fb649bdb8d890f24b1783d10cb9
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2943766
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-by: Sanjith T D <std@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
Tested-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
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
Change-Id: I87ab9b487fe5924ee9ee16bbb14d7f8c19f3a4e7
Signed-off-by: Sushil Kumar Singh <sushilkumars@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2939046
Tested-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
(cherry picked from commit 80f6470d40821bfbad8f8166d22442e949b47173)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2942039
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
ether_get_tx_ts, pdata->tx_ts_ref_cnt is an atomic variable
that is used as a mutex in this function and should not return 0
if the function fails to acquire the mutex.
The workqueue is scheduled when the return value of the
judgment function is <0. If one CPU core execution softirq
is running in ether_get_tx_ts function and another CPU core
softirq also calls ether_get_tx_ts function to get hardware
timestamp, then the acquisition of mutex fails and return 0.
After returning 0, the workqueue is not scheduled.
The timestamp cannot be obtained in time. So ether_get_tx_ts
should returns -1 on failure to acquire the mutex.
Bug 4150416
Change-Id: Icffd409b349d8bb8dbf5a483124b3bd3d7ef6cc8
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2934350
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Use '-Werror' and '-Wframe-larger-than' to replace
'-Werror=frame-larger-than' since clang compiler can't
ecognize the combination.
Build failure:
error: unknown warning option '-Werror=frame-larger-than=2560'; did you
mean '-Werror=frame-larger-than='? [-Werror,-Wunknown-warning-option]
Bug 4187941
Change-Id: I4d05a8dc96820517e1047b982a24ed97bb21327f
Signed-off-by: Jian-Min Liu <jianminl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2938229
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Interconnect support for multimedia engines is disable for Linux v6.2
kernels. Rather than always disabling interconnect support for these
kernels, we just need to ensure the necessary upstream kernel patches
are in place for Linux v6.2 kernels. Therefore, enable interconnect
support for all kernels.
Bug 4097374
Change-Id: Ibceb866ba239454a131543cdff90e68007b28942
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2937758
Reviewed-by: Johnny Liu <johnliu@nvidia.com>
Reviewed-by: Sumit Gupta <sumitg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Add a callback function host1x_syncpt_fence_signaled() to
.signaled op under host1x_syncpt_fence_ops.
.signaled is a optional operation. The change here is a performance
improvement and acts as temporary workaround for sync_file code not
calling enable_signaling.
Bug 4085239
Change-Id: Ief19c2d9af3f504bb1a067bfc9a31b9ef2ecd8fc
Signed-off-by: Santosh BS <santoshb@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2935867
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
If DEBUGFS is not enabled, then the following warning is observed ...
drivers/net/ethernet/nvidia/nvethernet/sysfs.c:3321:6:
error: unused variable [-Werror=unused-variable]
3321 | int ret = 0;
| ^~~
Fix this by ensuring that 'ret' is only defined if the DEBUGFS is
enabled.
Bug 4190165
Change-Id: I0182874592f20abe8d53b7bfdcfd099518b23f9c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2938450
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Building the Tegra RTCPU driver generates the following warning ...
drivers/platform/tegra/rtcpu/tegra-rtcpu-trace.c:
In function ‘rtcpu_trace_exceptions’:
drivers/platform/tegra/rtcpu/tegra-rtcpu-trace.c:331:1:
error: the frame size of 1424 bytes is larger than 1024 bytes
[-Werror=frame-larger-than=]
331 | }
| ^
Allow the frame size to be 2048 bytes to resolve the warning while a
proper fix is implemented.
Bug 4190165
Change-Id: Id684711f036fce759d7a328ad7d63f754a9b46e0
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2938377
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Linux v6.3 updated the GPIO APIs to use GPIO descriptors instead of
indices. This broke the Tegra SPI slave driver and when compiling the
driver for Linux v6.3 various warnings are observed. Update the Tegra
SPI slave driver as necessary to fix support for Linux v6.3.
Bug 4014315
Bug 4190165
Change-Id: Idfa29f729351d2971a649ddbcf1c3e9bf658d160
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2938376
Reviewed-by: Vishwaroop A <va@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Compiling the nvethernet driver without the ccflag CONFIG_TEGRA_NVPPS
defined generates the following warning ...
drivers/net/ethernet/nvidia/nvethernet/ether_linux.c:2936:5:
warning: "CONFIG_TEGRA_NVPPS" is not defined, evaluates to 0 [-Wundef]
2936 | #if CONFIG_TEGRA_NVPPS
| ^~~~~~~~~~~~~~~~~~
Fix this by using '#ifdef' to determine if CONFIG_TEGRA_NVPPS is
defined instead of '#if'.
Bug 4190030
Change-Id: Id1523de6f9ef9f4c72669584efb77ffd9ddf20f3
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2938375
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
CH384 is a PCI-Express bus converter chip, which converts PCIE bus to Quad
serial ports and printer port, including four asynchronous serial ports
compatible with 16C550 or 16C750
This VCP driver supports pci to uart chips ch382/ch384, Crystal frequency
support 22.1184M
Bug 3857918
Change-Id: Iae13dbbb0959178d69a93277823d8305973d66be
Signed-off-by: Ankit patel <anpatel@nvidia.com>
(cherry picked from commit c0239f39c89fcd11dc9a3228892e920c680ddf49)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2921009
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Building the nvethernet driver generates the following warning ...
drivers/net/ethernet/nvidia/nvethernet/ether_linux.c:6730:1: warning:
the frame size of 3664 bytes is larger than 2048 bytes
[-Wframe-larger-than=]
For now allow the frame size to be 4096 bytes to resolve the warning
while a proper fix is implemented.
Bug 4190030
Change-Id: I5460ec04c80458174c2c51dd0058b7cc191fe808
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2934698
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Building the nvvse-cryptodev driver generates the following warning ...
drivers/crypto/tegra-nvvse-cryptodev.c:2118:1: error: the frame size of
2224 bytes is larger than 2048 bytes [-Werror=fra
me-larger-than=]
2118 | }
| ^
For now allow the frame size to be 2560 bytes to resolve the warning
while a proper fix is implemented.
Bug 4190030
Change-Id: Id361aebc9f3d83181afc820d8d9cf2ef90e33d55
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2934696
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Building the realtek wireless driver generates various warnings due to
incorrect indentation or missing curly braces. For example, the
following warnings are seen ...
drivers/net/wireless/realtek/rtl8822ce/core/rtw_mlme.c: In function
‘rtw_drv_scan_by_self’:
drivers/net/wireless/realtek/rtl8822ce/core/rtw_mlme.c:3167:17:
warning: this ‘else’ clause does not guard... [-Wmisleading-indentation]
3167 | else
| ^~~~
drivers/net/wireless/realtek/rtl8822ce/core/rtw_mlme.c:3170:25:
note: ...this statement, but the latter is misleadingly indented as if
it were guarded by the ‘else’
3170 | goto exit;
| ^~~~
drivers/net/wireless/realtek/rtl8822ce/core/efuse/rtw_efuse.c:917:17:
warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
917 | if (i % 16 == 0)
| ^~
Fix the indentation and add the necessary curly braces to resolve these
warnings.
Bug 4190030
Change-Id: Ic13f1470043190ffd8401581cb97c908070c2940
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2934697
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-by: Shobek Attupurath <sattupurath@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
1. If vs_blk_dev_config.req_ops_supported has only DISCARD
support enabled, then REQ_OP_DISCARD should be mapped to
DISCARD for UFS.
2. If vs_blk_dev_config.req_ops_supported has only SECURE_ERASE
support enabled, then REQ_OP_DISCARD and REQ_OP_SECURE_ERASE
both should be mapped to SECURE_ERASE for UFS.
3. If vs_blk_dev_config.req_ops_supported has only ERASE
support enabled, then REQ_OP_DISCARD and REQ_OP_SECURE_ERASE
both should be mapped to ERASE for UFS.
Bug 4176555
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Change-Id: I01599df9ab93525120106dfabf2d345ab8b64770
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2920433
Reviewed-by: Sanjith T D <std@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Building the tegra-oc-event driver generates the following warning ...
drivers/thermal/tegra234-oc-event.c:180:31: warning: assignment discards
‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
180 | tegra234_oc->soc_data = match->data; | ^
Fix this by correcting the type for the soc_data structure member.
Bug 4190030
Change-Id: I8879186dfbf247eea57266281f489d57c9675292
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2934695
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Yi-Wei Wang <yiweiw@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
When building the PVA driver with GCC 13 the following error is
observed ...
drivers/video/tegra/host/pva/pva.c:1366:13:
error: the comparison will always evaluate as ‘true’ for the address
of ‘clk_cap_kobj’ will never be NULL [-Werror=address]
1366 | if (&pdata->clk_cap_kobj) {
| ^
The 'clk_cap_kobj' member of 'nvhost_device_data' structure is not a
pointer to a structure but a structure and so the address of the
structure is always true. Fix this by testing if the address of the
'clk_cap_attrs' member which is a pointer to memory that is
allocated.
Bug 4190030
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Change-Id: Iafe0da2a59f55420aa96ebc985c5352dfbed9c74
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2934461
Reviewed-by: Omar Nemri <onemri@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
When building the DLA KMD driver with GCC 13 the following error is
observed ...
drivers/video/tegra/host/nvdla/nvdla.c: In function ‘nvdla_remove’:
drivers/video/tegra/host/nvdla/nvdla.c:1229:13:
error: the comparison will always evaluate as ‘true’ for the address of
‘clk_cap_kobj’ will never be NULL [-Werror=address]
1229 | if (&pdata->clk_cap_kobj) {
| ^
The 'clk_cap_kobj' member of 'nvhost_device_data' structure is not a
pointer to a structure but a structure and so the address of the
structure is always true. Fix this by testing if the address of the
'clk_cap_attrs' member which is a pointer to memory that is allocated.
Bug 4190030
Change-Id: I8200155b4c0becab51924bcb4357c30163f62666
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2934411
Tested-by: Ninad Malwade <nmalwade@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Ninad Malwade <nmalwade@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Once we complete EVENT_ID_DCE_BOOT_COMPLETE_RECEIVED event handling, it
doesn't reset the complition variable. Which causes
dce_wait_interruptible to exit early without waiting in next cycle.
This patch fixes the same by resetting complition variable after use for
EVENT_ID_DCE_BOOT_COMPLETE_RECEIVED.
Bug 4167219
Change-Id: Id9b9047fa0e293f8616e23a5c8b4b1bacf233934
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2927740
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
When the device is in suspend mode, There is no point to update
actmon count weight and send ICC request for the device.
If ICC request is sent for the device in suspend mode, in osidle state,
the default EMC frequency will be affected due to the accumulated ICC
bandwidth QoS constraint, and affect the overall osidle power.
Bug 4168788
Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: I8700b131b5f914d93feed9f8a9d792c2fdaa9b53
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2931905
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>