block: virtual-storage: Allow build for Linux v6.10

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
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Jon Hunter
2024-04-26 15:46:47 +01:00
committed by mobile promotions
parent 6255ffef44
commit c73cf3c92a
3 changed files with 20 additions and 0 deletions

View File

@@ -6539,6 +6539,23 @@ compile_test() {
compile_check_conftest "$CODE" "NV_BLK_MQ_DESTROY_QUEUE_PRESENT" "" "functions"
;;
blk_queue_max_hw_sectors)
#
# Determine whether function blk_queue_max_hw_sectors() is present.
#
# Commit ec84ca4025c0 ("scsi: block: Remove now unused queue limits
# helpers") removed the function blk_queue_max_hw_sectors() in Linux
# v6.10.
#
CODE="
#include <linux/blk-mq.h>
void conftest_blk_queue_max_hw_sectors(void) {
blk_queue_max_hw_sectors();
}"
compile_check_conftest "$CODE" "NV_BLK_QUEUE_MAX_HW_SECTORS_PRESENT" "" "functions"
;;
block_device_operations_open_has_gendisk_arg)
#
# Determine if the 'open' function pointer from the