Skip to content

Commit d0fbe22

Browse files
steffen-maiergregkh
authored andcommitted
scsi: zfcp: fix missing trace records for early returns in TMF eh handlers
commit 1a5d999ebfc7bfe28deb48931bb57faa8e4102b6 upstream. For problem determination we need to see that we were in scsi_eh as well as whether and why we were successful or not. The following commits introduced new early returns without adding a trace record: v2.6.35 commit a1dbfdd ("[SCSI] zfcp: Pass return code from fc_block_scsi_eh to scsi eh") on fc_block_scsi_eh() returning != 0 which is FAST_IO_FAIL, v2.6.30 commit 63caf36 ("[SCSI] zfcp: Improve reliability of SCSI eh handlers in zfcp") on not having gotten an FSF request after the maximum number of retry attempts and thus could not issue a TMF and has to return FAILED. Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com> Fixes: a1dbfdd ("[SCSI] zfcp: Pass return code from fc_block_scsi_eh to scsi eh") Fixes: 63caf36 ("[SCSI] zfcp: Improve reliability of SCSI eh handlers in zfcp") Reviewed-by: Benjamin Block <bblock@linux.vnet.ibm.com> Signed-off-by: Benjamin Block <bblock@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 1a84736 commit d0fbe22

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

drivers/s390/scsi/zfcp_scsi.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,17 +273,21 @@ static int zfcp_task_mgmt_function(struct scsi_cmnd *scpnt, u8 tm_flags)
273273

274274
zfcp_erp_wait(adapter);
275275
ret = fc_block_scsi_eh(scpnt);
276-
if (ret)
276+
if (ret) {
277+
zfcp_dbf_scsi_devreset("fiof", scpnt, tm_flags, NULL);
277278
return ret;
279+
}
278280

279281
if (!(atomic_read(&adapter->status) &
280282
ZFCP_STATUS_COMMON_RUNNING)) {
281283
zfcp_dbf_scsi_devreset("nres", scpnt, tm_flags, NULL);
282284
return SUCCESS;
283285
}
284286
}
285-
if (!fsf_req)
287+
if (!fsf_req) {
288+
zfcp_dbf_scsi_devreset("reqf", scpnt, tm_flags, NULL);
286289
return FAILED;
290+
}
287291

288292
wait_for_completion(&fsf_req->completion);
289293

0 commit comments

Comments
 (0)