Douglas Gilbert fc13638ae9 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>
2020-07-29 00:03:52 -04:00
..
2019-11-07 06:43:18 -07:00
2020-03-11 23:07:59 -04:00
2020-06-15 23:28:04 -04:00
2019-03-02 11:39:54 -08:00
2018-06-19 22:02:25 -04:00
2019-11-12 22:21:35 -05:00
2020-02-24 14:54:25 -05:00
2020-03-11 23:07:59 -04:00
2020-04-14 21:32:39 -04:00
2019-01-08 21:58:35 -05:00
2019-07-11 15:14:01 -07:00
2020-07-28 22:34:52 -04:00
2020-07-24 22:09:55 -04:00
2018-11-06 21:31:28 -05:00
2020-07-24 22:09:55 -04:00
2019-07-11 15:14:01 -07:00
2019-07-11 15:17:41 -07:00
2020-07-24 22:09:55 -04:00
2020-06-19 23:06:43 -04:00
2019-07-11 15:14:01 -07:00
2020-06-19 23:06:43 -04:00
2018-06-19 22:02:25 -04:00
2020-07-08 01:03:44 -04:00
2019-07-11 15:14:01 -07:00
2020-06-13 13:17:49 -07:00
2020-02-24 15:01:57 -05:00
2019-07-11 15:14:01 -07:00