block: virtual-storage: Add dummy driver for Linux v6.11

The Tegra virtual storage driver fails to build for Linux v6.11 because
of the following issues:

 1. The functions blk_queue_logical_block_size(),
    blk_queue_physical_block_size() and blk_queue_max_discard_sectors()
    have been removed.
 2. The function blk_queue_write_cache() has too many arguments for
    Linux v6.11.
 3. The flag QUEUE_FLAG_NONROT is not defined for Linux v6.11.

Add a dummy driver for this driver for Linux v6.11 until this driver is
fixed.

Bug 4311184
Bug 4749580

Change-Id: I56f811d6ee29dd0025a5dc199ae84e3fc0f37b21
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3162886
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Jon Hunter
2024-06-26 15:15:13 +01:00
committed by mobile promotions
parent ec4681358b
commit 4941bf8dc8
2 changed files with 26 additions and 2 deletions

View File

@@ -1,13 +1,21 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: GPL-2.0-only
# SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Makefile for Virtual Storage Driver
#
LINUX_VERSION := $(shell expr $(VERSION) \* 256 + $(PATCHLEVEL))
LINUX_VERSION_6_11 := $(shell expr 6 \* 256 + 11)
# Use dummy driver for Kernel versions greater than or equal to Linux v6.11
ifeq ($(shell test $(LINUX_VERSION) -ge $(LINUX_VERSION_6_11); echo $$?),0)
tegra_vblk-y += tegra_hv_vblk_dummy.o
else
tegra_vblk-y += tegra_hv_vblk.o
tegra_vblk-y += tegra_hv_ioctl.o
tegra_vblk-y += tegra_hv_mmc.o
tegra_vblk-y += tegra_hv_scsi.o
tegra_vblk-y += tegra_hv_ufs.o
endif
obj-m += tegra_vblk.o

View File

@@ -0,0 +1,16 @@
// SPDX-License-Identifier: GPL-2.0-only
// SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#include <linux/module.h>
/* Dummy implementation for module */
static int __init tegra_hv_vblk_dummy_init(void)
{
return 0;
}
device_initcall(tegra_hv_vblk_dummy_init);
MODULE_AUTHOR("Jon Hunter <jonathanh@nvidia.com>");
MODULE_DESCRIPTION("Dummy Tegra HV VBLK driver");
MODULE_LICENSE("GPL");