diff options
author | Swen Schillig <swen@vnet.ibm.com> | 2009-03-02 07:09:07 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-03-12 13:58:21 -0400 |
commit | 24095490681d130979c18685dc0b5a308057e225 (patch) | |
tree | c832def98ffbecfc75794370111998b4206e215d /drivers/s390 | |
parent | 21ddaa53f92dba820a3778978e617f20ecb6ab6f (diff) |
[SCSI] zfcp: incorrect reaction on incoming RSCN
After an error condition resolved a remote storage port was never
re-opened. The incoming RSCN was not processed accordingly due
to a misinterpreted status flag / return value combination.
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/scsi/zfcp_fc.c | 18 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_fsf.c | 4 |
2 files changed, 7 insertions, 15 deletions
diff --git a/drivers/s390/scsi/zfcp_fc.c b/drivers/s390/scsi/zfcp_fc.c index ec700b3c2100..49a7a90501b6 100644 --- a/drivers/s390/scsi/zfcp_fc.c +++ b/drivers/s390/scsi/zfcp_fc.c | |||
@@ -145,16 +145,10 @@ static void _zfcp_fc_incoming_rscn(struct zfcp_fsf_req *fsf_req, u32 range, | |||
145 | struct zfcp_port *port; | 145 | struct zfcp_port *port; |
146 | 146 | ||
147 | read_lock_irqsave(&zfcp_data.config_lock, flags); | 147 | read_lock_irqsave(&zfcp_data.config_lock, flags); |
148 | list_for_each_entry(port, &fsf_req->adapter->port_list_head, list) { | 148 | list_for_each_entry(port, &fsf_req->adapter->port_list_head, list) |
149 | if (!(atomic_read(&port->status) & ZFCP_STATUS_PORT_PHYS_OPEN)) | 149 | if ((port->d_id & range) == (elem->nport_did & range)) |
150 | /* Try to connect to unused ports anyway. */ | ||
151 | zfcp_erp_port_reopen(port, | ||
152 | ZFCP_STATUS_COMMON_ERP_FAILED, | ||
153 | "fcirsc1", fsf_req); | ||
154 | else if ((port->d_id & range) == (elem->nport_did & range)) | ||
155 | /* Check connection status for connected ports */ | ||
156 | zfcp_test_link(port); | 150 | zfcp_test_link(port); |
157 | } | 151 | |
158 | read_unlock_irqrestore(&zfcp_data.config_lock, flags); | 152 | read_unlock_irqrestore(&zfcp_data.config_lock, flags); |
159 | } | 153 | } |
160 | 154 | ||
@@ -381,8 +375,10 @@ static void zfcp_fc_adisc_handler(unsigned long data) | |||
381 | if (!port->wwnn) | 375 | if (!port->wwnn) |
382 | port->wwnn = ls_adisc->wwnn; | 376 | port->wwnn = ls_adisc->wwnn; |
383 | 377 | ||
384 | if (port->wwpn != ls_adisc->wwpn) | 378 | if ((port->wwpn != ls_adisc->wwpn) || |
385 | zfcp_erp_port_reopen(port, 0, "fcadh_2", NULL); | 379 | !(atomic_read(&port->status) & ZFCP_STATUS_COMMON_OPEN)) |
380 | zfcp_erp_port_reopen(port, ZFCP_STATUS_COMMON_ERP_FAILED, | ||
381 | "fcadh_2", NULL); | ||
386 | 382 | ||
387 | out: | 383 | out: |
388 | zfcp_port_put(port); | 384 | zfcp_port_put(port); |
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index b4c9ba085093..71c32f3ffcb7 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c | |||
@@ -1161,10 +1161,6 @@ int zfcp_fsf_send_els(struct zfcp_send_els *els) | |||
1161 | struct fsf_qtcb_bottom_support *bottom; | 1161 | struct fsf_qtcb_bottom_support *bottom; |
1162 | int ret = -EIO; | 1162 | int ret = -EIO; |
1163 | 1163 | ||
1164 | if (unlikely(!(atomic_read(&els->port->status) & | ||
1165 | ZFCP_STATUS_COMMON_UNBLOCKED))) | ||
1166 | return -EBUSY; | ||
1167 | |||
1168 | spin_lock_bh(&adapter->req_q_lock); | 1164 | spin_lock_bh(&adapter->req_q_lock); |
1169 | if (zfcp_fsf_req_sbal_get(adapter)) | 1165 | if (zfcp_fsf_req_sbal_get(adapter)) |
1170 | goto out; | 1166 | goto out; |