]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.39/patches.arch/s390-12-14-zfcp_port_reference_counting.patch
Imported linux-2.6.27.39 suse/xen patches.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.arch / s390-12-14-zfcp_port_reference_counting.patch
CommitLineData
2cb7cef9
BS
1From: Gerald Schaefer <geraldsc@de.ibm.com>
2Subject: zfcp: Fix port reference counting
3References: bnc#487755,LTC#52847
4
5Symptom: If this problem appears zfcp ports cannot
6 be de-queued since it is checked for a
7 zero refcount.
8Problem: The port reference counting is wrong for
9 existing zfcp ports when e.g. an adapter
10 gets on-line again.
11Solution: During port scanning the reference counting
12 for existing ports should not be changed.
13
14Acked-by: John Jolly <jjolly@suse.de>
15---
16 drivers/s390/scsi/zfcp_fc.c | 7 ++++---
17 1 file changed, 4 insertions(+), 3 deletions(-)
18
19Index: 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
24 {
25 struct zfcp_adapter *adapter = port->adapter;
26
27+ if (!(atomic_read(&port->status) & ZFCP_STATUS_COMMON_NOESC))
28+ return;
29+
30 atomic_clear_mask(ZFCP_STATUS_COMMON_NOESC, &port->status);
31
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))
35 continue;
36 port = zfcp_get_port_by_wwpn(adapter, acc->wwpn);
37- if (port) {
38- zfcp_port_get(port);
39+ if (port)
40 continue;
41- }
42
43 port = zfcp_port_enqueue(adapter, acc->wwpn,
44 ZFCP_STATUS_PORT_DID_DID |