Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drivers: scsi: storvsc: Correctly handle TEST_UNIT_READY failure

On some Windows hosts on FC SANs, TEST_UNIT_READY can return SRB_STATUS_ERROR.
Correctly handle this. Note that there is sufficient sense information to
support scsi error handling even in this case.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>

authored by

K. Y. Srinivasan and committed by
Christoph Hellwig
3533f860 f885fb73

+7
+7
drivers/scsi/storvsc_drv.c
··· 1018 1018 case ATA_12: 1019 1019 set_host_byte(scmnd, DID_PASSTHROUGH); 1020 1020 break; 1021 + /* 1022 + * On Some Windows hosts TEST_UNIT_READY command can return 1023 + * SRB_STATUS_ERROR, let the upper level code deal with it 1024 + * based on the sense information. 1025 + */ 1026 + case TEST_UNIT_READY: 1027 + break; 1021 1028 default: 1022 1029 set_host_byte(scmnd, DID_TARGET_FAILURE); 1023 1030 }