aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_fsf.c
diff options
context:
space:
mode:
authorChristof Schmitt <christof.schmitt@de.ibm.com>2009-08-18 15:43:26 +0200
committerJames Bottomley <James.Bottomley@suse.de>2009-09-05 08:49:38 -0500
commit98fc4d5c8cd9bd1a412cca922feecb54c1c22d8e (patch)
treeba2985e12e493bad9a2d1b76476b9697f8aba7eb /drivers/s390/scsi/zfcp_fsf.c
parent[SCSI] zfcp: Use kthread API for zfcp erp thread (diff)
downloadlinux-dev-98fc4d5c8cd9bd1a412cca922feecb54c1c22d8e.tar.xz
linux-dev-98fc4d5c8cd9bd1a412cca922feecb54c1c22d8e.zip
[SCSI] zfcp: Simplify and update ct/gs and els timeout handling
The recommendation for a timeout of 2 * R_A_TOV is the same for ct/gs and els requests, so set it in the common function used for initializing both request types. Besides, the timer inside zfcp should only run longer than the timeout set for the channel, so 10 seconds more should be enough (instead of 60 seconds). Reviewed-by: Swen Schillig <swen@vnet.ibm.com> Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to '')
-rw-r--r--drivers/s390/scsi/zfcp_fsf.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c
index c241f032fd49..f09c863dc6bd 100644
--- a/drivers/s390/scsi/zfcp_fsf.c
+++ b/drivers/s390/scsi/zfcp_fsf.c
@@ -1060,7 +1060,12 @@ static int zfcp_fsf_setup_ct_els_sbals(struct zfcp_fsf_req *req,
sg_resp, max_sbals);
if (bytes <= 0)
return -EIO;
+
+ /* common settings for ct/gs and els requests */
req->qtcb->bottom.support.resp_buf_length = bytes;
+ req->qtcb->bottom.support.service_class = FSF_CLASS_3;
+ req->qtcb->bottom.support.timeout = 2 * R_A_TOV;
+ zfcp_fsf_start_timer(req, 2 * R_A_TOV + 10);
return 0;
}
@@ -1096,12 +1101,9 @@ int zfcp_fsf_send_ct(struct zfcp_send_ct *ct, mempool_t *pool)
req->handler = zfcp_fsf_send_ct_handler;
req->qtcb->header.port_handle = wka_port->handle;
- req->qtcb->bottom.support.service_class = FSF_CLASS_3;
- req->qtcb->bottom.support.timeout = ct->timeout;
req->data = ct;
zfcp_dbf_san_ct_request(req);
- zfcp_fsf_start_timer(req, ZFCP_FSF_REQUEST_TIMEOUT);
ret = zfcp_fsf_req_send(req);
if (ret)
@@ -1176,7 +1178,6 @@ int zfcp_fsf_send_els(struct zfcp_send_els *els)
{
struct zfcp_fsf_req *req;
struct zfcp_qdio *qdio = els->adapter->qdio;
- struct fsf_qtcb_bottom_support *bottom;
int ret = -EIO;
spin_lock_bh(&qdio->req_q_lock);
@@ -1196,16 +1197,12 @@ int zfcp_fsf_send_els(struct zfcp_send_els *els)
if (ret)
goto failed_send;
- bottom = &req->qtcb->bottom.support;
+ req->qtcb->bottom.support.d_id = els->d_id;
req->handler = zfcp_fsf_send_els_handler;
- bottom->d_id = els->d_id;
- bottom->service_class = FSF_CLASS_3;
- bottom->timeout = 2 * R_A_TOV;
req->data = els;
zfcp_dbf_san_els_request(req);
- zfcp_fsf_start_timer(req, ZFCP_FSF_REQUEST_TIMEOUT);
ret = zfcp_fsf_req_send(req);
if (ret)
goto failed_send;