]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
scsi: storvsc: properly set residual data length on errors
authorLong Li <longli@microsoft.com>
Thu, 15 Dec 2016 02:46:03 +0000 (18:46 -0800)
committerTim Gardner <tim.gardner@canonical.com>
Mon, 20 Feb 2017 03:57:58 +0000 (20:57 -0700)
commit673b117b6d5ba8216c2c582065a4ef7468907a79
tree91d01deaec5d6ed782c1495b01d18d4038fda365
parent81e96cb1f370656689f4566bae8c95a694fdffab
scsi: storvsc: properly set residual data length on errors

BugLink: http://bugs.launchpad.net/bugs/1663687
On I/O errors, the Windows driver doesn't set data_transfer_length
on error conditions other than SRB_STATUS_DATA_OVERRUN.
In these cases we need to set data_transfer_length to 0,
indicating there is no data transferred. On SRB_STATUS_DATA_OVERRUN,
data_transfer_length is set by the Windows driver to the actual data transferred.

Reported-by: Shiva Krishna <Shiva.Krishna@nimblestorage.com>
Signed-off-by: Long Li <longli@microsoft.com>
Reviewed-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from linux-next commit 40630f462824ee24bc00d692865c86c3828094e0)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/scsi/storvsc_drv.c