blk: vblk: Fix build for Linux v6.15

In Linux v6.15, the 'request_queue' parameter was removed from the
function blk_rq_map_sg(). Add a conftest to check for this and update
the Tegra HV VBLK driver accordingly.

JIRA LINQPJ14-47

Change-Id: I140200fe7acbaebb383abd7939153178f0ca484a
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3330664
(cherry picked from commit a20fde1ade16dbfbac3f48327c360ca0a7c36545)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3475292
Tested-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
This commit is contained in:
Jon Hunter
2025-03-25 15:54:48 +00:00
committed by mobile promotions
parent 3fba8947fb
commit 3d26747166
3 changed files with 24 additions and 0 deletions

View File

@@ -534,8 +534,12 @@ static bool submit_bio_req(struct vblk_dev *vblkdev)
}
sg_init_table(vsc_req->sg_lst,
bio_req->nr_phys_segments);
#if defined(NV_BLK_RQ_MAP_SG_HAS_NO_QUEUE_ARG) /* Linux v6.15 */
sg_cnt = blk_rq_map_sg(bio_req, vsc_req->sg_lst);
#else
sg_cnt = blk_rq_map_sg(vblkdev->queue, bio_req,
vsc_req->sg_lst);
#endif
vsc_req->sg_num_ents = sg_nents(vsc_req->sg_lst);
if (dma_map_sg(vblkdev->device, vsc_req->sg_lst,
vsc_req->sg_num_ents, DMA_BIDIRECTIONAL) == 0) {