mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
Some user space applications set the dxfer_direction to 0 when the dxfer_len is set to 0. The native SCSI driver (sg.c) handles this by checking for both dxfer_direction and dxfer_len. To be compatible with the native SCSI driver, set the dxfer_direction to SG_DXFER_NONE when dxfer_len is <= 0. Bug 4617391 Bug 4318509 Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3133692 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> (cherry picked from commit 3fc4ded22141268c8a28bb40234899c042e49ce4) Signed-off-by: Sanjith T D <std@nvidia.com> Change-Id: Ie56128a84d21579de1c187c4bb5611ec33ae2f1b Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3237146 GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com> Reviewed-by: Vipin Kumar <vipink@nvidia.com>