diff options
author | Christof Schmitt <christof.schmitt@de.ibm.com> | 2010-07-08 09:53:06 +0200 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-07-28 09:46:36 -0500 |
commit | 097ef3bd0cd4f156fee039e52855d095b7ba3db4 (patch) | |
tree | 72d96fca0f876d43e692225914d5059570fe8fa7 | |
parent | 5767620c383a226e39891e7e654a70ebb8e95e69 (diff) | |
download | kernel_samsung_crespo-097ef3bd0cd4f156fee039e52855d095b7ba3db4.zip kernel_samsung_crespo-097ef3bd0cd4f156fee039e52855d095b7ba3db4.tar.gz kernel_samsung_crespo-097ef3bd0cd4f156fee039e52855d095b7ba3db4.tar.bz2 |
[SCSI] zfcp: Do not try "forced close" when port is already closed
When the port is already "physically closed" try the reopen instead.
There is no way to send a "physically close" to an already closed
port.
Reviewed-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
-rw-r--r-- | drivers/s390/scsi/zfcp_erp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c index c663eb2..5a71b73 100644 --- a/drivers/s390/scsi/zfcp_erp.c +++ b/drivers/s390/scsi/zfcp_erp.c @@ -141,9 +141,13 @@ static int zfcp_erp_required_act(int want, struct zfcp_adapter *adapter, if (!(p_status & ZFCP_STATUS_COMMON_UNBLOCKED)) need = ZFCP_ERP_ACTION_REOPEN_PORT; /* fall through */ - case ZFCP_ERP_ACTION_REOPEN_PORT: case ZFCP_ERP_ACTION_REOPEN_PORT_FORCED: p_status = atomic_read(&port->status); + if (!(p_status & ZFCP_STATUS_COMMON_OPEN)) + need = ZFCP_ERP_ACTION_REOPEN_PORT; + /* fall through */ + case ZFCP_ERP_ACTION_REOPEN_PORT: + p_status = atomic_read(&port->status); if (p_status & ZFCP_STATUS_COMMON_ERP_INUSE) return 0; a_status = atomic_read(&adapter->status); |