aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_fc.c
diff options
context:
space:
mode:
authorSwen Schillig <swen@vnet.ibm.com>2010-01-14 11:19:02 -0500
committerJames Bottomley <James.Bottomley@suse.de>2010-01-17 13:40:13 -0500
commit51375ee8374dd7fa574e1a14ebac406c6d28543b (patch)
treecfc822b99af2a8bb894c4a549093f92ea917ff8e /drivers/s390/scsi/zfcp_fc.c
parent491ca4426ba153f79e72d1ca2a30c926484282b7 (diff)
[SCSI] zfcp: Set hardware timeout as requested by BSG request.
The hardware used with zfcp provides a timer for CT and ELS requests instead of an abort capability for these commands. To correctly handle the FC BSG timeouts, pass the timeout from the BSG requests to the hardware. Signed-off-by: Swen Schillig <swen@vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/s390/scsi/zfcp_fc.c')
-rw-r--r--drivers/s390/scsi/zfcp_fc.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/s390/scsi/zfcp_fc.c b/drivers/s390/scsi/zfcp_fc.c
index 37a0ca200a32..0f7b493fb105 100644
--- a/drivers/s390/scsi/zfcp_fc.c
+++ b/drivers/s390/scsi/zfcp_fc.c
@@ -258,7 +258,8 @@ static int zfcp_fc_ns_gid_pn_request(struct zfcp_port *port,
258 gid_pn->gid_pn_req.gid_pn.fn_wwpn = port->wwpn; 258 gid_pn->gid_pn_req.gid_pn.fn_wwpn = port->wwpn;
259 259
260 ret = zfcp_fsf_send_ct(&adapter->gs->ds, &gid_pn->ct, 260 ret = zfcp_fsf_send_ct(&adapter->gs->ds, &gid_pn->ct,
261 adapter->pool.gid_pn_req); 261 adapter->pool.gid_pn_req,
262 ZFCP_FC_CTELS_TMO);
262 if (!ret) { 263 if (!ret) {
263 wait_for_completion(&completion); 264 wait_for_completion(&completion);
264 zfcp_fc_ns_gid_pn_eval(gid_pn); 265 zfcp_fc_ns_gid_pn_eval(gid_pn);
@@ -421,7 +422,8 @@ static int zfcp_fc_adisc(struct zfcp_port *port)
421 hton24(adisc->adisc_req.adisc_port_id, 422 hton24(adisc->adisc_req.adisc_port_id,
422 fc_host_port_id(adapter->scsi_host)); 423 fc_host_port_id(adapter->scsi_host));
423 424
424 ret = zfcp_fsf_send_els(adapter, port->d_id, &adisc->els); 425 ret = zfcp_fsf_send_els(adapter, port->d_id, &adisc->els,
426 ZFCP_FC_CTELS_TMO);
425 if (ret) 427 if (ret)
426 kmem_cache_free(zfcp_data.adisc_cache, adisc); 428 kmem_cache_free(zfcp_data.adisc_cache, adisc);
427 429
@@ -532,7 +534,8 @@ static int zfcp_fc_send_gpn_ft(struct zfcp_fc_gpn_ft *gpn_ft,
532 ct->req = &gpn_ft->sg_req; 534 ct->req = &gpn_ft->sg_req;
533 ct->resp = gpn_ft->sg_resp; 535 ct->resp = gpn_ft->sg_resp;
534 536
535 ret = zfcp_fsf_send_ct(&adapter->gs->ds, ct, NULL); 537 ret = zfcp_fsf_send_ct(&adapter->gs->ds, ct, NULL,
538 ZFCP_FC_CTELS_TMO);
536 if (!ret) 539 if (!ret)
537 wait_for_completion(&completion); 540 wait_for_completion(&completion);
538 return ret; 541 return ret;
@@ -734,7 +737,7 @@ static int zfcp_fc_exec_els_job(struct fc_bsg_job *job,
734 d_id = ntoh24(job->request->rqst_data.h_els.port_id); 737 d_id = ntoh24(job->request->rqst_data.h_els.port_id);
735 738
736 els->handler = zfcp_fc_ct_els_job_handler; 739 els->handler = zfcp_fc_ct_els_job_handler;
737 return zfcp_fsf_send_els(adapter, d_id, els); 740 return zfcp_fsf_send_els(adapter, d_id, els, job->req->timeout / HZ);
738} 741}
739 742
740static int zfcp_fc_exec_ct_job(struct fc_bsg_job *job, 743static int zfcp_fc_exec_ct_job(struct fc_bsg_job *job,
@@ -753,7 +756,7 @@ static int zfcp_fc_exec_ct_job(struct fc_bsg_job *job,
753 return ret; 756 return ret;
754 757
755 ct->handler = zfcp_fc_ct_job_handler; 758 ct->handler = zfcp_fc_ct_job_handler;
756 ret = zfcp_fsf_send_ct(wka_port, ct, NULL); 759 ret = zfcp_fsf_send_ct(wka_port, ct, NULL, job->req->timeout / HZ);
757 if (ret) 760 if (ret)
758 zfcp_fc_wka_port_put(wka_port); 761 zfcp_fc_wka_port_put(wka_port);
759 762