]> git.ipfire.org Git - people/arne_f/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)
committerJiri Slaby <jslaby@suse.cz>
Mon, 13 Mar 2017 20:40:27 +0000 (21:40 +0100)
commit7c095762ae405b47c70c6ce95775c30ad9927afd
tree49ed1ec5c4f145ebd4893f1015dca3fa9232880f
parent53b5abb513fa2e876e7ddb552cf4ffc86900d45d
scsi: storvsc: properly set residual data length on errors

commit 40630f462824ee24bc00d692865c86c3828094e0 upstream.

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>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/scsi/storvsc_drv.c