aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ibmvscsi/ibmvfc.c
diff options
context:
space:
mode:
authorBrian King <brking@linux.vnet.ibm.com>2010-06-17 14:55:15 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-07-27 13:02:41 -0400
commit3f01424c8128af7a69c824176bff195be457d6ac (patch)
tree4d664b1c6fabc3a569b929c8814418556952501e /drivers/scsi/ibmvscsi/ibmvfc.c
parent73ee5d8672871bd69077ca71e7208a36bfa6343c (diff)
[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: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/ibmvscsi/ibmvfc.c')
-rw-r--r--drivers/scsi/ibmvscsi/ibmvfc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c
index d6fcb3f43969..bd96cecaa619 100644
--- a/drivers/scsi/ibmvscsi/ibmvfc.c
+++ b/drivers/scsi/ibmvscsi/ibmvfc.c
@@ -2311,6 +2311,7 @@ static int ibmvfc_eh_abort_handler(struct scsi_cmnd *cmd)
2311 int rc = FAILED; 2311 int rc = FAILED;
2312 2312
2313 ENTER; 2313 ENTER;
2314 fc_block_scsi_eh(cmd);
2314 ibmvfc_wait_while_resetting(vhost); 2315 ibmvfc_wait_while_resetting(vhost);
2315 cancel_rc = ibmvfc_cancel_all(sdev, IBMVFC_TMF_ABORT_TASK_SET); 2316 cancel_rc = ibmvfc_cancel_all(sdev, IBMVFC_TMF_ABORT_TASK_SET);
2316 abort_rc = ibmvfc_abort_task_set(sdev); 2317 abort_rc = ibmvfc_abort_task_set(sdev);
@@ -2337,6 +2338,7 @@ static int ibmvfc_eh_device_reset_handler(struct scsi_cmnd *cmd)
2337 int rc = FAILED; 2338 int rc = FAILED;
2338 2339
2339 ENTER; 2340 ENTER;
2341 fc_block_scsi_eh(cmd);
2340 ibmvfc_wait_while_resetting(vhost); 2342 ibmvfc_wait_while_resetting(vhost);
2341 cancel_rc = ibmvfc_cancel_all(sdev, IBMVFC_TMF_LUN_RESET); 2343 cancel_rc = ibmvfc_cancel_all(sdev, IBMVFC_TMF_LUN_RESET);
2342 reset_rc = ibmvfc_reset_device(sdev, IBMVFC_LUN_RESET, "LUN"); 2344 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 unsigned long cancel_rc = 0; 2403 unsigned long cancel_rc = 0;
2402 2404
2403 ENTER; 2405 ENTER;
2406 fc_block_scsi_eh(cmd);
2404 ibmvfc_wait_while_resetting(vhost); 2407 ibmvfc_wait_while_resetting(vhost);
2405 starget_for_each_device(starget, &cancel_rc, ibmvfc_dev_cancel_all_reset); 2408 starget_for_each_device(starget, &cancel_rc, ibmvfc_dev_cancel_all_reset);
2406 reset_rc = ibmvfc_reset_device(sdev, IBMVFC_TARGET_RESET, "target"); 2409 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 int rc; 2425 int rc;
2423 struct ibmvfc_host *vhost = shost_priv(cmd->device->host); 2426 struct ibmvfc_host *vhost = shost_priv(cmd->device->host);
2424 2427
2428 fc_block_scsi_eh(cmd);
2425 dev_err(vhost->dev, "Resetting connection due to error recovery\n"); 2429 dev_err(vhost->dev, "Resetting connection due to error recovery\n");
2426 rc = ibmvfc_issue_fc_host_lip(vhost->host); 2430 rc = ibmvfc_issue_fc_host_lip(vhost->host);
2427 return rc ? FAILED : SUCCESS; 2431 return rc ? FAILED : SUCCESS;