diff options
author | Christof Schmitt <christof.schmitt@de.ibm.com> | 2009-08-18 09:43:26 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2009-09-05 09:49:38 -0400 |
commit | 98fc4d5c8cd9bd1a412cca922feecb54c1c22d8e (patch) | |
tree | ba2985e12e493bad9a2d1b76476b9697f8aba7eb /drivers/s390/scsi/zfcp_fsf.c | |
parent | 347c6a965dc110c91a77f65181fc011ee257a4a6 (diff) |
[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 'drivers/s390/scsi/zfcp_fsf.c')
-rw-r--r-- | drivers/s390/scsi/zfcp_fsf.c | 15 |
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, | |||
1060 | sg_resp, max_sbals); | 1060 | sg_resp, max_sbals); |
1061 | if (bytes <= 0) | 1061 | if (bytes <= 0) |
1062 | return -EIO; | 1062 | return -EIO; |
1063 | |||
1064 | /* common settings for ct/gs and els requests */ | ||
1063 | req->qtcb->bottom.support.resp_buf_length = bytes; | 1065 | req->qtcb->bottom.support.resp_buf_length = bytes; |
1066 | req->qtcb->bottom.support.service_class = FSF_CLASS_3; | ||
1067 | req->qtcb->bottom.support.timeout = 2 * R_A_TOV; | ||
1068 | zfcp_fsf_start_timer(req, 2 * R_A_TOV + 10); | ||
1064 | 1069 | ||
1065 | return 0; | 1070 | return 0; |
1066 | } | 1071 | } |
@@ -1096,12 +1101,9 @@ int zfcp_fsf_send_ct(struct zfcp_send_ct *ct, mempool_t *pool) | |||
1096 | 1101 | ||
1097 | req->handler = zfcp_fsf_send_ct_handler; | 1102 | req->handler = zfcp_fsf_send_ct_handler; |
1098 | req->qtcb->header.port_handle = wka_port->handle; | 1103 | req->qtcb->header.port_handle = wka_port->handle; |
1099 | req->qtcb->bottom.support.service_class = FSF_CLASS_3; | ||
1100 | req->qtcb->bottom.support.timeout = ct->timeout; | ||
1101 | req->data = ct; | 1104 | req->data = ct; |
1102 | 1105 | ||
1103 | zfcp_dbf_san_ct_request(req); | 1106 | zfcp_dbf_san_ct_request(req); |
1104 | zfcp_fsf_start_timer(req, ZFCP_FSF_REQUEST_TIMEOUT); | ||
1105 | 1107 | ||
1106 | ret = zfcp_fsf_req_send(req); | 1108 | ret = zfcp_fsf_req_send(req); |
1107 | if (ret) | 1109 | if (ret) |
@@ -1176,7 +1178,6 @@ int zfcp_fsf_send_els(struct zfcp_send_els *els) | |||
1176 | { | 1178 | { |
1177 | struct zfcp_fsf_req *req; | 1179 | struct zfcp_fsf_req *req; |
1178 | struct zfcp_qdio *qdio = els->adapter->qdio; | 1180 | struct zfcp_qdio *qdio = els->adapter->qdio; |
1179 | struct fsf_qtcb_bottom_support *bottom; | ||
1180 | int ret = -EIO; | 1181 | int ret = -EIO; |
1181 | 1182 | ||
1182 | spin_lock_bh(&qdio->req_q_lock); | 1183 | spin_lock_bh(&qdio->req_q_lock); |
@@ -1196,16 +1197,12 @@ int zfcp_fsf_send_els(struct zfcp_send_els *els) | |||
1196 | if (ret) | 1197 | if (ret) |
1197 | goto failed_send; | 1198 | goto failed_send; |
1198 | 1199 | ||
1199 | bottom = &req->qtcb->bottom.support; | 1200 | req->qtcb->bottom.support.d_id = els->d_id; |
1200 | req->handler = zfcp_fsf_send_els_handler; | 1201 | req->handler = zfcp_fsf_send_els_handler; |
1201 | bottom->d_id = els->d_id; | ||
1202 | bottom->service_class = FSF_CLASS_3; | ||
1203 | bottom->timeout = 2 * R_A_TOV; | ||
1204 | req->data = els; | 1202 | req->data = els; |
1205 | 1203 | ||
1206 | zfcp_dbf_san_els_request(req); | 1204 | zfcp_dbf_san_els_request(req); |
1207 | 1205 | ||
1208 | zfcp_fsf_start_timer(req, ZFCP_FSF_REQUEST_TIMEOUT); | ||
1209 | ret = zfcp_fsf_req_send(req); | 1206 | ret = zfcp_fsf_req_send(req); |
1210 | if (ret) | 1207 | if (ret) |
1211 | goto failed_send; | 1208 | goto failed_send; |