From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8D4F6308F2E; Wed, 28 Jan 2026 15:53:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769615604; cv=none; b=gVERzE0HcfEIZRGzlc/vOi15+XCk1XrGxa/b6wEf4qwToo3Ablh0s+oHV1dd4TBfGsD5veqgC8JFoKuffZgtz0uZ4yHDNXt66QO6HfzQHgBvqD/kILFZlfuZz8bdjETgJPiBft9e2bA5hxYbnpdIhbnNyFwSCZI4+LbUZ0UCOJs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769615604; c=relaxed/simple; bh=7rcotOEHzt7N0Cz5kp9g5foJj8LQkliMrZwT0U3fSUk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=IjnLtPQzPk2CJIZT23LNXqG0mcCVwiRTBYofQPs7crRLT+XG8dGC0zdydaxVtdMl4t1ZDk/VZ9SSzaoFsrh7Pr4NSKGuogBTzvgMjQbp7kELPFST/pSe2jSmaMwwYzulGEkMFxzUNrC1BvGgjWUuZyY0XwNZ22oQOtSn7btoEn8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=jsSdX8q6; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="jsSdX8q6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E3D02C4CEF1; Wed, 28 Jan 2026 15:53:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1769615604; bh=7rcotOEHzt7N0Cz5kp9g5foJj8LQkliMrZwT0U3fSUk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jsSdX8q6hxgkJU34IOhm4r9L7T5YY6Vp182Sbc5Y0mmERr1FMpdmSdo5N/zTWL9xm cbugdR0c+4AROHW8OPchUg8mqutzyiVHMROMnvE7WcrdzyPIK+lxjDEynDN4SD0PJo 6sBL42qa9DlPC8jzypYnkIdLtMoRFpljFnlxKtY0= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, stable@kernel.org, Long Li , Michael Kelley , "Martin K. Petersen" Subject: [PATCH 6.18 057/227] scsi: storvsc: Process unsupported MODE_SENSE_10 Date: Wed, 28 Jan 2026 16:21:42 +0100 Message-ID: <20260128145346.392853284@linuxfoundation.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260128145344.331957407@linuxfoundation.org> References: <20260128145344.331957407@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Long Li commit 9eacec5d18f98f89be520eeeef4b377acee3e4b8 upstream. The Hyper-V host does not support MODE_SENSE_10 and MODE_SENSE. The driver handles MODE_SENSE as unsupported command, but not for MODE_SENSE_10. Add MODE_SENSE_10 to the same handling logic and return correct code to SCSI layer. Fixes: 89ae7d709357 ("Staging: hv: storvsc: Move the storage driver out of the staging area") Cc: stable@kernel.org Signed-off-by: Long Li Reviewed-by: Michael Kelley Link: https://patch.msgid.link/20260117010302.294068-1-longli@linux.microsoft.com Signed-off-by: Martin K. Petersen Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/storvsc_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/scsi/storvsc_drv.c +++ b/drivers/scsi/storvsc_drv.c @@ -1144,7 +1144,7 @@ static void storvsc_on_io_completion(str * The current SCSI handling on the host side does * not correctly handle: * INQUIRY command with page code parameter set to 0x80 - * MODE_SENSE command with cmd[2] == 0x1c + * MODE_SENSE and MODE_SENSE_10 command with cmd[2] == 0x1c * MAINTENANCE_IN is not supported by HyperV FC passthrough * * Setup srb and scsi status so this won't be fatal. @@ -1154,6 +1154,7 @@ static void storvsc_on_io_completion(str if ((stor_pkt->vm_srb.cdb[0] == INQUIRY) || (stor_pkt->vm_srb.cdb[0] == MODE_SENSE) || + (stor_pkt->vm_srb.cdb[0] == MODE_SENSE_10) || (stor_pkt->vm_srb.cdb[0] == MAINTENANCE_IN && hv_dev_is_fc(device))) { vstor_packet->vm_srb.scsi_status = 0;