+++ /dev/null
-From: Gerald Schaefer <geraldsc@de.ibm.com>
-Subject: zfcp: Fix port reference counting
-References: bnc#487755,LTC#52847
-
-Symptom: If this problem appears zfcp ports cannot
- be de-queued since it is checked for a
- zero refcount.
-Problem: The port reference counting is wrong for
- existing zfcp ports when e.g. an adapter
- gets on-line again.
-Solution: During port scanning the reference counting
- for existing ports should not be changed.
-
-Acked-by: John Jolly <jjolly@suse.de>
----
- drivers/s390/scsi/zfcp_fc.c | 7 ++++---
- 1 file changed, 4 insertions(+), 3 deletions(-)
-
-Index: linux-sles11/drivers/s390/scsi/zfcp_fc.c
-===================================================================
---- linux-sles11.orig/drivers/s390/scsi/zfcp_fc.c
-+++ linux-sles11/drivers/s390/scsi/zfcp_fc.c
-@@ -535,6 +535,9 @@ static void zfcp_validate_port(struct zf
- {
- struct zfcp_adapter *adapter = port->adapter;
-
-+ if (!(atomic_read(&port->status) & ZFCP_STATUS_COMMON_NOESC))
-+ return;
-+
- atomic_clear_mask(ZFCP_STATUS_COMMON_NOESC, &port->status);
-
- if ((port->supported_classes != 0) ||
-@@ -595,10 +598,8 @@ static int zfcp_scan_eval_gpn_ft(struct
- if (acc->wwpn == fc_host_port_name(adapter->scsi_host))
- continue;
- port = zfcp_get_port_by_wwpn(adapter, acc->wwpn);
-- if (port) {
-- zfcp_port_get(port);
-+ if (port)
- continue;
-- }
-
- port = zfcp_port_enqueue(adapter, acc->wwpn,
- ZFCP_STATUS_PORT_DID_DID |