Patch "scsi: storvsc: Always set no_report_opcodes" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    scsi: storvsc: Always set no_report_opcodes

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     scsi-storvsc-always-set-no_report_opcodes.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 53d5316a1303d46385d8f4f4021eb5a4f8be2c2f
Author: Michael Kelley <mikelley@xxxxxxxxxxxxx>
Date:   Fri Jun 9 13:38:21 2023 -0700

    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@xxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/1686343101-18930-1-git-send-email-mikelley@xxxxxxxxxxxxx
    Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index 823088c7b199e..44f4e10f9bf9a 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -1423,6 +1423,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;
 
 	/*



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux