Commit 3f01424c authored by Brian King's avatar Brian King Committed by James Bottomley

[SCSI] ibmvfc: Add support for fc_block_scsi_eh

Adds support for fc_block_scsi_eh to block the EH handlers if
the target device is in the blocked state to ensure we don't
take devices offline.
Signed-off-by: default avatarBrian King <brking@linux.vnet.ibm.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent 73ee5d86
...@@ -2311,6 +2311,7 @@ static int ibmvfc_eh_abort_handler(struct scsi_cmnd *cmd) ...@@ -2311,6 +2311,7 @@ static int ibmvfc_eh_abort_handler(struct scsi_cmnd *cmd)
int rc = FAILED; int rc = FAILED;
ENTER; ENTER;
fc_block_scsi_eh(cmd);
ibmvfc_wait_while_resetting(vhost); ibmvfc_wait_while_resetting(vhost);
cancel_rc = ibmvfc_cancel_all(sdev, IBMVFC_TMF_ABORT_TASK_SET); cancel_rc = ibmvfc_cancel_all(sdev, IBMVFC_TMF_ABORT_TASK_SET);
abort_rc = ibmvfc_abort_task_set(sdev); abort_rc = ibmvfc_abort_task_set(sdev);
...@@ -2337,6 +2338,7 @@ static int ibmvfc_eh_device_reset_handler(struct scsi_cmnd *cmd) ...@@ -2337,6 +2338,7 @@ static int ibmvfc_eh_device_reset_handler(struct scsi_cmnd *cmd)
int rc = FAILED; int rc = FAILED;
ENTER; ENTER;
fc_block_scsi_eh(cmd);
ibmvfc_wait_while_resetting(vhost); ibmvfc_wait_while_resetting(vhost);
cancel_rc = ibmvfc_cancel_all(sdev, IBMVFC_TMF_LUN_RESET); cancel_rc = ibmvfc_cancel_all(sdev, IBMVFC_TMF_LUN_RESET);
reset_rc = ibmvfc_reset_device(sdev, IBMVFC_LUN_RESET, "LUN"); reset_rc = ibmvfc_reset_device(sdev, IBMVFC_LUN_RESET, "LUN");
...@@ -2401,6 +2403,7 @@ static int ibmvfc_eh_target_reset_handler(struct scsi_cmnd *cmd) ...@@ -2401,6 +2403,7 @@ static int ibmvfc_eh_target_reset_handler(struct scsi_cmnd *cmd)
unsigned long cancel_rc = 0; unsigned long cancel_rc = 0;
ENTER; ENTER;
fc_block_scsi_eh(cmd);
ibmvfc_wait_while_resetting(vhost); ibmvfc_wait_while_resetting(vhost);
starget_for_each_device(starget, &cancel_rc, ibmvfc_dev_cancel_all_reset); starget_for_each_device(starget, &cancel_rc, ibmvfc_dev_cancel_all_reset);
reset_rc = ibmvfc_reset_device(sdev, IBMVFC_TARGET_RESET, "target"); reset_rc = ibmvfc_reset_device(sdev, IBMVFC_TARGET_RESET, "target");
...@@ -2422,6 +2425,7 @@ static int ibmvfc_eh_host_reset_handler(struct scsi_cmnd *cmd) ...@@ -2422,6 +2425,7 @@ static int ibmvfc_eh_host_reset_handler(struct scsi_cmnd *cmd)
int rc; int rc;
struct ibmvfc_host *vhost = shost_priv(cmd->device->host); struct ibmvfc_host *vhost = shost_priv(cmd->device->host);
fc_block_scsi_eh(cmd);
dev_err(vhost->dev, "Resetting connection due to error recovery\n"); dev_err(vhost->dev, "Resetting connection due to error recovery\n");
rc = ibmvfc_issue_fc_host_lip(vhost->host); rc = ibmvfc_issue_fc_host_lip(vhost->host);
return rc ? FAILED : SUCCESS; return rc ? FAILED : SUCCESS;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment