Skip to content

Commit a1dbfdd

Browse files
Christof SchmittJames Bottomley
Christof Schmitt
authored and
James Bottomley
committed
[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>
1 parent 2f2eb58 commit a1dbfdd

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

drivers/s390/scsi/zfcp_scsi.c

+13-5
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ static int zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt)
175175
struct zfcp_fsf_req *old_req, *abrt_req;
176176
unsigned long flags;
177177
unsigned long old_reqid = (unsigned long) scpnt->host_scribble;
178-
int retval = SUCCESS;
178+
int retval = SUCCESS, ret;
179179
int retry = 3;
180180
char *dbf_tag;
181181

@@ -200,7 +200,9 @@ static int zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt)
200200
break;
201201

202202
zfcp_erp_wait(adapter);
203-
fc_block_scsi_eh(scpnt);
203+
ret = fc_block_scsi_eh(scpnt);
204+
if (ret)
205+
return ret;
204206
if (!(atomic_read(&adapter->status) &
205207
ZFCP_STATUS_COMMON_RUNNING)) {
206208
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)
231233
struct zfcp_unit *unit = scpnt->device->hostdata;
232234
struct zfcp_adapter *adapter = unit->port->adapter;
233235
struct zfcp_fsf_req *fsf_req = NULL;
234-
int retval = SUCCESS;
236+
int retval = SUCCESS, ret;
235237
int retry = 3;
236238

237239
while (retry--) {
@@ -240,7 +242,10 @@ static int zfcp_task_mgmt_function(struct scsi_cmnd *scpnt, u8 tm_flags)
240242
break;
241243

242244
zfcp_erp_wait(adapter);
243-
fc_block_scsi_eh(scpnt);
245+
ret = fc_block_scsi_eh(scpnt);
246+
if (ret)
247+
return ret;
248+
244249
if (!(atomic_read(&adapter->status) &
245250
ZFCP_STATUS_COMMON_RUNNING)) {
246251
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)
276281
{
277282
struct zfcp_unit *unit = scpnt->device->hostdata;
278283
struct zfcp_adapter *adapter = unit->port->adapter;
284+
int ret;
279285

280286
zfcp_erp_adapter_reopen(adapter, 0, "schrh_1", scpnt);
281287
zfcp_erp_wait(adapter);
282-
fc_block_scsi_eh(scpnt);
288+
ret = fc_block_scsi_eh(scpnt);
289+
if (ret)
290+
return ret;
283291

284292
return SUCCESS;
285293
}

0 commit comments

Comments
 (0)