scsi: storvsc: Always set no_report_opcodes
authorMichael Kelley <mikelley@microsoft.com>
Fri, 9 Jun 2023 20:38:21 +0000 (13:38 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Sep 2023 07:42:25 +0000 (09:42 +0200)
commit1a7f80f33a5911bd33352f639533ba9ca3444bc3
tree9c825d21d0f3fd8e8c39066b9b517fa88b2d4e9e
parent7d1ac3c2eb70558d2b4c1ec9d966000d4cc6b353
scsi: storvsc: Always set no_report_opcodes

[ Upstream commit 31d16e712bdcaee769de4780f72ff8d6cd3f0589 ]

Hyper-V synthetic SCSI devices do not support the MAINTENANCE_IN SCSI
command, so scsi_report_opcode() always fails, resulting in messages like
this:

hv_storvsc <guid>: tag#205 cmd 0xa3 status: scsi 0x2 srb 0x86 hv 0xc0000001

The recently added support for command duration limits calls
scsi_report_opcode() four times as each device comes online, which
significantly increases the number of messages logged in a system with many
disks.

Fix the problem by always marking Hyper-V synthetic SCSI devices as not
supporting scsi_report_opcode(). With this setting, the MAINTENANCE_IN SCSI
command is not issued and no messages are logged.

Signed-off-by: Michael Kelley <mikelley@microsoft.com>
Link: https://lore.kernel.org/r/1686343101-18930-1-git-send-email-mikelley@microsoft.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/storvsc_drv.c