diff options
author | Christof Schmitt <christof.schmitt@de.ibm.com> | 2010-03-24 11:50:31 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-04-11 10:49:35 -0400 |
commit | a1dbfddd02d2b3e75f8750c68563e1d6eec16260 (patch) | |
tree | 130622cc131439bb4883d94ca862b2152109ad6e /drivers/s390/scsi | |
parent | 2f2eb58762b4dcddfe25c90800323765c1257eca (diff) |
[SCSI] zfcp: Pass return code from fc_block_scsi_eh to scsi eh
The return code FAST_IO_FAIL from fc_block_scsi_eh indicates that the
pending I/O requests have been terminated as a result of the
fast_io_fail_tmo. Pass this return code back to the scsi eh to stop
the scsi eh in this case.
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')
-rw-r--r-- | drivers/s390/scsi/zfcp_scsi.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c index 174b6d57d576..d13eb9a6408a 100644 --- a/drivers/s390/scsi/zfcp_scsi.c +++ b/drivers/s390/scsi/zfcp_scsi.c | |||
@@ -175,7 +175,7 @@ static int zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt) | |||
175 | struct zfcp_fsf_req *old_req, *abrt_req; | 175 | struct zfcp_fsf_req *old_req, *abrt_req; |
176 | unsigned long flags; | 176 | unsigned long flags; |
177 | unsigned long old_reqid = (unsigned long) scpnt->host_scribble; | 177 | unsigned long old_reqid = (unsigned long) scpnt->host_scribble; |
178 | int retval = SUCCESS; | 178 | int retval = SUCCESS, ret; |
179 | int retry = 3; | 179 | int retry = 3; |
180 | char *dbf_tag; | 180 | char *dbf_tag; |
181 | 181 | ||
@@ -200,7 +200,9 @@ static int zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt) | |||
200 | break; | 200 | break; |
201 | 201 | ||
202 | zfcp_erp_wait(adapter); | 202 | zfcp_erp_wait(adapter); |
203 | fc_block_scsi_eh(scpnt); | 203 | ret = fc_block_scsi_eh(scpnt); |
204 | if (ret) | ||
205 | return ret; | ||
204 | if (!(atomic_read(&adapter->status) & | 206 | if (!(atomic_read(&adapter->status) & |
205 | ZFCP_STATUS_COMMON_RUNNING)) { | 207 | ZFCP_STATUS_COMMON_RUNNING)) { |
206 | zfcp_dbf_scsi_abort("nres", adapter->dbf, scpnt, NULL, | 208 | zfcp_dbf_scsi_abort("nres", adapter->dbf, scpnt, NULL, |
@@ -231,7 +233,7 @@ static int zfcp_task_mgmt_function(struct scsi_cmnd *scpnt, u8 tm_flags) | |||
231 | struct zfcp_unit *unit = scpnt->device->hostdata; | 233 | struct zfcp_unit *unit = scpnt->device->hostdata; |
232 | struct zfcp_adapter *adapter = unit->port->adapter; | 234 | struct zfcp_adapter *adapter = unit->port->adapter; |
233 | struct zfcp_fsf_req *fsf_req = NULL; | 235 | struct zfcp_fsf_req *fsf_req = NULL; |
234 | int retval = SUCCESS; | 236 | int retval = SUCCESS, ret; |
235 | int retry = 3; | 237 | int retry = 3; |
236 | 238 | ||
237 | while (retry--) { | 239 | while (retry--) { |
@@ -240,7 +242,10 @@ static int zfcp_task_mgmt_function(struct scsi_cmnd *scpnt, u8 tm_flags) | |||
240 | break; | 242 | break; |
241 | 243 | ||
242 | zfcp_erp_wait(adapter); | 244 | zfcp_erp_wait(adapter); |
243 | fc_block_scsi_eh(scpnt); | 245 | ret = fc_block_scsi_eh(scpnt); |
246 | if (ret) | ||
247 | return ret; | ||
248 | |||
244 | if (!(atomic_read(&adapter->status) & | 249 | if (!(atomic_read(&adapter->status) & |
245 | ZFCP_STATUS_COMMON_RUNNING)) { | 250 | ZFCP_STATUS_COMMON_RUNNING)) { |
246 | zfcp_dbf_scsi_devreset("nres", tm_flags, unit, scpnt); | 251 | zfcp_dbf_scsi_devreset("nres", tm_flags, unit, scpnt); |
@@ -276,10 +281,13 @@ static int zfcp_scsi_eh_host_reset_handler(struct scsi_cmnd *scpnt) | |||
276 | { | 281 | { |
277 | struct zfcp_unit *unit = scpnt->device->hostdata; | 282 | struct zfcp_unit *unit = scpnt->device->hostdata; |
278 | struct zfcp_adapter *adapter = unit->port->adapter; | 283 | struct zfcp_adapter *adapter = unit->port->adapter; |
284 | int ret; | ||
279 | 285 | ||
280 | zfcp_erp_adapter_reopen(adapter, 0, "schrh_1", scpnt); | 286 | zfcp_erp_adapter_reopen(adapter, 0, "schrh_1", scpnt); |
281 | zfcp_erp_wait(adapter); | 287 | zfcp_erp_wait(adapter); |
282 | fc_block_scsi_eh(scpnt); | 288 | ret = fc_block_scsi_eh(scpnt); |
289 | if (ret) | ||
290 | return ret; | ||
283 | 291 | ||
284 | return SUCCESS; | 292 | return SUCCESS; |
285 | } | 293 | } |