From 9a434d524e4512e009fd4c4ec502e34c525cb29b Mon Sep 17 00:00:00 2001 From: Hardik Tushar Shah Date: Tue, 18 Feb 2020 15:29:11 +0530 Subject: SCSI: Fix SCSI ioctls for virtual storage driver Virtualized Storage driver expects data buffer to be cache aligned as its used by DMA engine for transfer. Driver allocates cache aligned buffer but data len is not cache aligned since data_len depends on ioctl. So add field to pass data_buf_len separately which is cache aligned. Change VSC server to use this field for cache operations for IOCTLs. Bug 200588819 Change-Id: Ib6b40a06582bd7fe6f60dee854096a42db4d08b2 Signed-off-by: Hardik Tushar Shah Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2299239 Reviewed-by: Dmitry Pervushin Reviewed-by: Phoenix Jung Reviewed-by: mobile promotions GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions --- include/tegra_virt_storage_spec.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/tegra_virt_storage_spec.h b/include/tegra_virt_storage_spec.h index d476d5463..ef5c2bb97 100644 --- a/include/tegra_virt_storage_spec.h +++ b/include/tegra_virt_storage_spec.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2018-2020, NVIDIA CORPORATION. All rights reserved. * * This software is licensed under the terms of the GNU General Public * License version 2, as published by the Free Software Foundation, and @@ -233,6 +233,7 @@ struct vblk_sg_io_hdr uint32_t sbp_arg_offset; /* [i], [*o] offset to sense_buffer memory */ uint32_t status; /* [o] scsi status */ uint8_t sb_len_wr; /* [o] byte count actually written to sbp */ + uint32_t dxfer_buf_len; /* [i] Length of data transfer buffer */ }; #pragma pack(pop) -- cgit v1.2.2