scsi: core: Change the return type of .eh_timed_out()
authorBart Van Assche <bvanassche@acm.org>
Tue, 18 Oct 2022 20:29:50 +0000 (13:29 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sat, 22 Oct 2022 03:25:59 +0000 (03:25 +0000)
commitdee7121e8c0a3ce41af2b02d516f54eaec32abcd
tree9f2b2ca07d0e8bdca6f764f98b7c3c3df814e527
parent978b7922d3dca672b41bb4b8ce6c06ab77112741
scsi: core: Change the return type of .eh_timed_out()

Commit 6600593cbd93 ("block: rename BLK_EH_NOT_HANDLED to BLK_EH_DONE")
made it impossible for .eh_timed_out() implementations to call
scsi_done() without causing a crash.

Restore support for SCSI timeout handlers to call scsi_done() as follows:

 * Change all .eh_timed_out() handlers as follows:

   - Change the return type into enum scsi_timeout_action.
   - Change BLK_EH_RESET_TIMER into SCSI_EH_RESET_TIMER.
   - Change BLK_EH_DONE into SCSI_EH_NOT_HANDLED.

 * In scsi_timeout(), convert the SCSI_EH_* values into BLK_EH_* values.

Reviewed-by: Lee Duncan <lduncan@suse.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Ming Lei <ming.lei@redhat.com>
Cc: John Garry <john.garry@huawei.com>
Cc: Mike Christie <michael.christie@oracle.com>
Cc: Hannes Reinecke <hare@suse.de>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20221018202958.1902564-3-bvanassche@acm.org
Reviewed-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
15 files changed:
Documentation/scsi/scsi_eh.rst
drivers/message/fusion/mptsas.c
drivers/scsi/libiscsi.c
drivers/scsi/megaraid/megaraid_sas_base.c
drivers/scsi/mvumi.c
drivers/scsi/qla4xxx/ql4_os.c
drivers/scsi/scsi_error.c
drivers/scsi/scsi_transport_fc.c
drivers/scsi/scsi_transport_srp.c
drivers/scsi/storvsc_drv.c
drivers/scsi/virtio_scsi.c
include/scsi/libiscsi.h
include/scsi/scsi_host.h
include/scsi/scsi_transport_fc.h
include/scsi/scsi_transport_srp.h