Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2544b794 authored by K. Y. Srinivasan's avatar K. Y. Srinivasan Committed by Greg Kroah-Hartman
Browse files

Staging: hv: storvsc: In case of scsi errors offline the device



When we do get fatal errors from the host, offline the device since the
host has already tried all possible recovery actions.

Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent b8de73df
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -1154,6 +1154,14 @@ static void storvsc_command_completion(struct hv_storvsc_request *request)
		}
	}

	/*
	 * If there is an error; offline the device since all
	 * error recovery strategies would have already been
	 * deployed on the host side.
	 */
	if (vm_srb->srb_status == 0x4)
		scmnd->result = DID_TARGET_FAILURE << 16;
	else
		scmnd->result = vm_srb->scsi_status;

	if (scmnd->result) {