aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/scsi/zfcp_scsi.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c
index 39a621d729e9..0ecec9c1b490 100644
--- a/drivers/s390/scsi/zfcp_scsi.c
+++ b/drivers/s390/scsi/zfcp_scsi.c
@@ -112,12 +112,26 @@ static int zfcp_scsi_queuecommand(struct scsi_cmnd *scpnt,
112 } 112 }
113 113
114 status = atomic_read(&unit->status); 114 status = atomic_read(&unit->status);
115 if (unlikely((status & ZFCP_STATUS_COMMON_ERP_FAILED) || 115 if (unlikely(status & ZFCP_STATUS_COMMON_ERP_FAILED) &&
116 !(status & ZFCP_STATUS_COMMON_RUNNING))) { 116 !(atomic_read(&unit->port->status) &
117 ZFCP_STATUS_COMMON_ERP_FAILED)) {
118 /* only unit access denied, but port is good
119 * not covered by FC transport, have to fail here */
117 zfcp_scsi_command_fail(scpnt, DID_ERROR); 120 zfcp_scsi_command_fail(scpnt, DID_ERROR);
118 return 0; 121 return 0;
119 } 122 }
120 123
124 if (unlikely(!(status & ZFCP_STATUS_COMMON_UNBLOCKED))) {
125 /* This could be either
126 * open unit pending: this is temporary, will result in
127 * open unit or ERP_FAILED, so retry command
128 * call to rport_delete pending: mimic retry from
129 * fc_remote_port_chkready until rport is BLOCKED
130 */
131 zfcp_scsi_command_fail(scpnt, DID_IMM_RETRY);
132 return 0;
133 }
134
121 ret = zfcp_fsf_send_fcp_command_task(unit, scpnt); 135 ret = zfcp_fsf_send_fcp_command_task(unit, scpnt);
122 if (unlikely(ret == -EBUSY)) 136 if (unlikely(ret == -EBUSY))
123 return SCSI_MLQUEUE_DEVICE_BUSY; 137 return SCSI_MLQUEUE_DEVICE_BUSY;