summaryrefslogtreecommitdiff
path: root/drivers/scsi/scsi_proc.c
diff options
context:
space:
mode:
authorWenchao Hao <haowenchao2@huawei.com>2023-10-10 17:20:45 +0800
committerMartin K. Petersen <martin.petersen@oracle.com>2023-10-16 20:50:11 -0400
commit32be8b6e22eb76a08c66414593ef02d5eb151be7 (patch)
tree1ac1e7e429442931dc115c8ad725dee0371f36c6 /drivers/scsi/scsi_proc.c
parent962d77cd4c852e6a34ffd44fc5f32ba678e02633 (diff)
scsi: scsi_debug: Time out command if the error is injected
If a timeout error is injected, return 0 from scsi_debug_queuecommand to make the command time out. Time out SCSI command format: +--------+------+-------------------------------------------------------+ | Column | Type | Description | +--------+------+-------------------------------------------------------+ | 1 | u8 | Error type, fixed to 0x0 | +--------+------+-------------------------------------------------------+ | 2 | s32 | Error count | | | | 0: this rule will be ignored | | | | positive: the rule will always take effect | | | | negative: the rule takes effect n times where -n is | | | | the value given. Ignored after n times | +--------+------+-------------------------------------------------------+ | 3 | x8 | SCSI command opcode, 0xff for all commands | +--------+------+-------------------------------------------------------+ Examples: error=/sys/kernel/debug/scsi_debug/0:0:0:1/error echo "0 -10 0x12" > ${error} will make the device's inquiry command time out 10 times. echo "0 1 0x12" > ${error} will make the device's inquiry time out each time it is invoked on this device. Acked-by: Douglas Gilbert <dgilbert@interlog.com> Signed-off-by: Wenchao Hao <haowenchao2@huawei.com> Link: https://lore.kernel.org/r/20231010092051.608007-5-haowenchao2@huawei.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/scsi_proc.c')
0 files changed, 0 insertions, 0 deletions