1 From: Gerald Schaefer <geraldsc@de.ibm.com>
2 Subject: zfcp: Fix port reference counting
3 References: bnc#487755,LTC#52847
5 Symptom: If this problem appears zfcp ports cannot
6 be de-queued since it is checked for a
8 Problem: The port reference counting is wrong for
9 existing zfcp ports when e.g. an adapter
11 Solution: During port scanning the reference counting
12 for existing ports should not be changed.
14 Acked-by: John Jolly <jjolly@suse.de>
16 drivers/s390/scsi/zfcp_fc.c | 7 ++++---
17 1 file changed, 4 insertions(+), 3 deletions(-)
19 Index: linux-sles11/drivers/s390/scsi/zfcp_fc.c
20 ===================================================================
21 --- linux-sles11.orig/drivers/s390/scsi/zfcp_fc.c
22 +++ linux-sles11/drivers/s390/scsi/zfcp_fc.c
23 @@ -535,6 +535,9 @@ static void zfcp_validate_port(struct zf
25 struct zfcp_adapter *adapter = port->adapter;
27 + if (!(atomic_read(&port->status) & ZFCP_STATUS_COMMON_NOESC))
30 atomic_clear_mask(ZFCP_STATUS_COMMON_NOESC, &port->status);
32 if ((port->supported_classes != 0) ||
33 @@ -595,10 +598,8 @@ static int zfcp_scan_eval_gpn_ft(struct
34 if (acc->wwpn == fc_host_port_name(adapter->scsi_host))
36 port = zfcp_get_port_by_wwpn(adapter, acc->wwpn);
38 - zfcp_port_get(port);
43 port = zfcp_port_enqueue(adapter, acc->wwpn,
44 ZFCP_STATUS_PORT_DID_DID |