stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Michael Kelley <mikelley@microsoft.com>,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	Sasha Levin <sashal@kernel.org>,
	kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org,
	decui@microsoft.com, jejb@linux.ibm.com,
	linux-hyperv@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: [PATCH AUTOSEL 6.1 11/15] scsi: storvsc: Always set no_report_opcodes
Date: Tue, 29 Aug 2023 09:32:41 -0400	[thread overview]
Message-ID: <20230829133245.520176-11-sashal@kernel.org> (raw)
In-Reply-To: <20230829133245.520176-1-sashal@kernel.org>

From: Michael Kelley <mikelley@microsoft.com>

[ 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 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index 5284f9a0b826e..167f4d112a5f9 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -1567,6 +1567,8 @@ static int storvsc_device_configure(struct scsi_device *sdevice)
 {
 	blk_queue_rq_timeout(sdevice->request_queue, (storvsc_timeout * HZ));
 
+	/* storvsc devices don't support MAINTENANCE_IN SCSI cmd */
+	sdevice->no_report_opcodes = 1;
 	sdevice->no_write_same = 1;
 
 	/*
-- 
2.40.1


  parent reply	other threads:[~2023-08-29 13:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-29 13:32 [PATCH AUTOSEL 6.1 01/15] wifi: cfg80211: remove links only on AP Sasha Levin
2023-08-29 13:32 ` [PATCH AUTOSEL 6.1 02/15] wifi: mac80211: Use active_links instead of valid_links in Tx Sasha Levin
2023-08-29 13:32 ` [PATCH AUTOSEL 6.1 03/15] netlabel: fix shift wrapping bug in netlbl_catmap_setlong() Sasha Levin
2023-08-29 13:32 ` [PATCH AUTOSEL 6.1 04/15] bnx2x: fix page fault following EEH recovery Sasha Levin
2023-08-29 13:32 ` [PATCH AUTOSEL 6.1 05/15] smb/client: print "Unknown" instead of bogus link speed value Sasha Levin
2023-08-29 13:32 ` [PATCH AUTOSEL 6.1 06/15] cifs: fix sockaddr comparison in iface_cmp Sasha Levin
2023-08-29 13:32 ` [PATCH AUTOSEL 6.1 07/15] cifs: fix max_credits implementation Sasha Levin
2023-08-29 13:32 ` [PATCH AUTOSEL 6.1 08/15] sctp: handle invalid error codes without calling BUG() Sasha Levin
2023-08-29 13:32 ` [PATCH AUTOSEL 6.1 09/15] cifs: add a warning when the in-flight count goes negative Sasha Levin
2023-08-29 13:32 ` [PATCH AUTOSEL 6.1 10/15] scsi: aacraid: Reply queue mapping to CPUs based on IRQ affinity Sasha Levin
2023-09-06 10:09   ` Linux regression tracking (Thorsten Leemhuis)
2023-08-29 13:32 ` Sasha Levin [this message]
2023-08-29 13:32 ` [PATCH AUTOSEL 6.1 12/15] scsi: lpfc: Fix incorrect big endian type assignment in bsg loopback path Sasha Levin
2023-08-29 13:32 ` [PATCH AUTOSEL 6.1 13/15] LoongArch: Let pmd_present() return true when splitting pmd Sasha Levin
2023-08-29 13:32 ` [PATCH AUTOSEL 6.1 14/15] LoongArch: Fix the write_fcsr() macro Sasha Levin
2023-08-29 13:32 ` [PATCH AUTOSEL 6.1 15/15] ALSA: seq: oss: Fix racy open/close of MIDI devices Sasha Levin
  -- strict thread matches above, loose matches on Subject: below --
2023-06-26 21:50 [PATCH AUTOSEL 6.1 01/15] wifi: cfg80211: remove links only on AP Sasha Levin
2023-06-26 21:50 ` [PATCH AUTOSEL 6.1 11/15] scsi: storvsc: Always set no_report_opcodes Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230829133245.520176-11-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=decui@microsoft.com \
    --cc=haiyangz@microsoft.com \
    --cc=jejb@linux.ibm.com \
    --cc=kys@microsoft.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=mikelley@microsoft.com \
    --cc=stable@vger.kernel.org \
    --cc=wei.liu@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).