scsi: scsi_transport_fc: Add a new rport state FC_PORTSTATE_MARGINAL
authorMuneendra Kumar <muneendra.kumar@broadcom.com>
Wed, 6 Jan 2021 21:49:06 +0000 (03:19 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 15 Jan 2021 03:55:17 +0000 (22:55 -0500)
commit02c66326dc7e8b3a71b7ceb9a08ec1208e13ea84
tree998a87c008a17ca8d421c0b698441f704494e27b
parent60bee27ba2dff82eb921c515e49236abfb6c54ab
scsi: scsi_transport_fc: Add a new rport state FC_PORTSTATE_MARGINAL

Add a new interface, fc_eh_should_retry_cmd(), which checks if the cmd
should be retried or not by checking the rport state. If the rport state is
marginal it returns false to make sure there won't be any retries on the
cmd.

Make the fc_remote_port_delete(), fc_user_scan_tgt(), and
fc_timeout_deleted_rport() functions handle the new rport state.

Link: https://lore.kernel.org/r/1609969748-17684-4-git-send-email-muneendra.kumar@broadcom.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Muneendra Kumar <muneendra.kumar@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/scsi_transport_fc.c
include/scsi/scsi_transport_fc.h