From 6584be8cc3e104ed9fc0ae9e54d5f1231998d031 Mon Sep 17 00:00:00 2001 From: gokull Date: Mon, 2 Sep 2024 11:24:39 +0000 Subject: [PATCH] Increase IVC timeout Intermittent vblk failure during boot up. Change Contains: [*] Increase the ivc_notified() timeout from 32usecs to 15msecs Bug 4826664 Signed-off-by: gokull Change-Id: I3a5aef2dd5288e16ae4e51cf081b53b388327022 (cherry-picked from commit b1c28a9a2b6d919864d51cdea271001a68522d8b) Change-Id: I3a5aef2dd5288e16ae4e51cf081b53b388327022 Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3210713 GVS: buildbot_gerritrpt Reviewed-by: Vipin Kumar Tested-by: Gokul Vasan L J --- .../block/tegra_virt_storage/tegra_hv_vblk.c | 17 ++++++++++++----- drivers/block/tegra_virt_storage/tegra_vblk.h | 15 +++++++++++---- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/drivers/block/tegra_virt_storage/tegra_hv_vblk.c b/drivers/block/tegra_virt_storage/tegra_hv_vblk.c index 13908b7b..2b344ad7 100644 --- a/drivers/block/tegra_virt_storage/tegra_hv_vblk.c +++ b/drivers/block/tegra_virt_storage/tegra_hv_vblk.c @@ -1,6 +1,13 @@ -// SPDX-License-Identifier: GPL-2.0-only -// SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - +/* SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. + * SPDX-License-Identifier: LicenseRef-NvidiaProprietary + * + * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual + * property and proprietary rights in and to this material, related + * documentation and any modifications thereto. Any use, reproduction, + * disclosure or distribution of this material and related documentation + * without an express license agreement from NVIDIA CORPORATION or + * its affiliates is strictly prohibited. + */ #include #include #include @@ -177,7 +184,7 @@ static int vblk_send_config_cmd(struct vblk_dev *vblkdev) return -EIO; } set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(usecs_to_jiffies(1)); + schedule_timeout(usecs_to_jiffies(IVC_RESET_RETRY_WAIT_15USECS)); } } vs_req = (struct vs_request *) @@ -1048,7 +1055,7 @@ static int vblk_inject_err_fsi(unsigned int inst_id, struct epl_error_report_fra return -EIO; } set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(usecs_to_jiffies(1)); + schedule_timeout(usecs_to_jiffies(IVC_RESET_RETRY_WAIT_15USECS)); } } diff --git a/drivers/block/tegra_virt_storage/tegra_vblk.h b/drivers/block/tegra_virt_storage/tegra_vblk.h index fa8ccaad..bcc96538 100644 --- a/drivers/block/tegra_virt_storage/tegra_vblk.h +++ b/drivers/block/tegra_virt_storage/tegra_vblk.h @@ -1,8 +1,14 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ /* - * Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. + * SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. + * SPDX-License-Identifier: LicenseRef-NvidiaProprietary + * + * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual + * property and proprietary rights in and to this material, related + * documentation and any modifications thereto. Any use, reproduction, + * disclosure or distribution of this material and related documentation + * without an express license agreement from NVIDIA CORPORATION or + * its affiliates is strictly prohibited. */ - #ifndef _TEGRA_VBLK_H_ #define _TEGRA_VBLK_H_ @@ -23,7 +29,8 @@ /* Minor number and partition management. */ #define VBLK_MINORS 32 -#define IVC_RESET_RETRIES 30 +#define IVC_RESET_RETRIES 1000 +#define IVC_RESET_RETRY_WAIT_15USECS 15 #define VS_LOG_HEADS 4 #define VS_LOG_SECTS 16