summaryrefslogtreecommitdiff
path: root/drivers/scsi/virtio_scsi.c
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2020-07-24 18:55:31 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2020-07-29 07:03:52 +0300
commitfc13638ae92ee9eb861732d642d922d577b82a9e (patch)
treef8ada45efa2aaa39698ab5462a0ee1b7da804b3d /drivers/scsi/virtio_scsi.c
parent84905d34f14987687ab1be64f15b453d11a41e55 (diff)
downloadlinux-fc13638ae92ee9eb861732d642d922d577b82a9e.tar.xz
scsi: scsi_debug: Implement tur_ms_to_ready parameter
The current driver responds to TEST UNIT READY (TUR) with a GOOD status immediately after a scsi_debug device (LU) is created. This is unrealistic as even SSDs take some time after power-on before accepting media access commands. Add the tur_ms_to_ready parameter whose unit is milliseconds (default 0) and is the period before which a TUR (or any media access command) will set the CHECK CONDITION status with a sense key of NOT READY and an additional sense of "Logical unit is in process of becoming ready". The period starts when each scsi_debug device is created. This patch was prompted by T10 proposal 20-061r2 which was accepted on 2020716. It adds that a TUR in the situation described in the previous paragraph may set the INFO field (or descriptor) in the sense data to the estimated number in milliseconds before a subsequent TUR will yield a GOOD status. This patch follows that advice. Link: https://lore.kernel.org/r/20200724155531.668144-1-dgilbert@interlog.com Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Douglas Gilbert <dgilbert@interlog.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/virtio_scsi.c')
0 files changed, 0 insertions, 0 deletions