]>
Commit | Line | Data |
---|---|---|
2cb7cef9 BS |
1 | From: Gerald Schaefer <geraldsc@de.ibm.com> |
2 | Subject: zfcp: incorrect reaction on incoming RSCN. | |
3 | References: bnc#482818,LTC#51960 | |
4 | ||
5 | Symptom: After re-establishing a remote storage port connection | |
6 | the port was never re-opened. | |
7 | Problem: The port re-opening was prevented by a unfortunate | |
8 | status flag combination, verification. | |
9 | Solution: Fix the oddities in the processing on RSCN receiption. | |
10 | ||
11 | Acked-by: John Jolly <jjolly@suse.de> | |
12 | --- | |
13 | drivers/s390/scsi/zfcp_dbf.c | 4 ++-- | |
14 | drivers/s390/scsi/zfcp_fc.c | 18 +++++++----------- | |
15 | drivers/s390/scsi/zfcp_fsf.c | 4 ---- | |
16 | 3 files changed, 9 insertions(+), 17 deletions(-) | |
17 | ||
18 | Index: linux-sles11/drivers/s390/scsi/zfcp_fsf.c | |
19 | =================================================================== | |
20 | --- linux-sles11.orig/drivers/s390/scsi/zfcp_fsf.c | |
21 | +++ linux-sles11/drivers/s390/scsi/zfcp_fsf.c | |
22 | @@ -1165,10 +1165,6 @@ int zfcp_fsf_send_els(struct zfcp_send_e | |
23 | struct fsf_qtcb_bottom_support *bottom; | |
24 | int ret = -EIO; | |
25 | ||
26 | - if (unlikely(!(atomic_read(&els->port->status) & | |
27 | - ZFCP_STATUS_COMMON_UNBLOCKED))) | |
28 | - return -EBUSY; | |
29 | - | |
30 | spin_lock_bh(&adapter->req_q_lock); | |
31 | if (zfcp_fsf_req_sbal_get(adapter)) | |
32 | goto out; | |
33 | Index: linux-sles11/drivers/s390/scsi/zfcp_dbf.c | |
34 | =================================================================== | |
35 | --- linux-sles11.orig/drivers/s390/scsi/zfcp_dbf.c | |
36 | +++ linux-sles11/drivers/s390/scsi/zfcp_dbf.c | |
37 | @@ -553,7 +553,7 @@ static const char *zfcp_rec_dbf_ids[] = | |
38 | [61] = "", | |
39 | [62] = "request timeout", | |
40 | [63] = "adisc link test reject or timeout", | |
41 | - [64] = "adisc link test d_id changed", | |
42 | + [64] = "adisc link test d_id changed or port not open", | |
43 | [65] = "adisc link test failed", | |
44 | [66] = "recovery out of memory", | |
45 | [67] = "adapter recovery repeated after state change", | |
46 | @@ -574,7 +574,7 @@ static const char *zfcp_rec_dbf_ids[] = | |
47 | [79] = "link down", | |
48 | [80] = "exclusive read-only unit access unsupported", | |
49 | [81] = "shared read-write unit access unsupported", | |
50 | - [82] = "incoming rscn", | |
51 | + [82] = "", | |
52 | [83] = "incoming wwpn", | |
53 | [84] = "wka port handle not valid close port", | |
54 | [85] = "online", | |
55 | Index: linux-sles11/drivers/s390/scsi/zfcp_fc.c | |
56 | =================================================================== | |
57 | --- linux-sles11.orig/drivers/s390/scsi/zfcp_fc.c | |
58 | +++ linux-sles11/drivers/s390/scsi/zfcp_fc.c | |
59 | @@ -122,16 +122,10 @@ static void _zfcp_fc_incoming_rscn(struc | |
60 | struct zfcp_port *port; | |
61 | ||
62 | read_lock_irqsave(&zfcp_data.config_lock, flags); | |
63 | - list_for_each_entry(port, &fsf_req->adapter->port_list_head, list) { | |
64 | - if (!(atomic_read(&port->status) & ZFCP_STATUS_PORT_PHYS_OPEN)) | |
65 | - /* Try to connect to unused ports anyway. */ | |
66 | - zfcp_erp_port_reopen(port, | |
67 | - ZFCP_STATUS_COMMON_ERP_FAILED, | |
68 | - 82, fsf_req); | |
69 | - else if ((port->d_id & range) == (elem->nport_did & range)) | |
70 | - /* Check connection status for connected ports */ | |
71 | + list_for_each_entry(port, &fsf_req->adapter->port_list_head, list) | |
72 | + if ((port->d_id & range) == (elem->nport_did & range)) | |
73 | zfcp_test_link(port); | |
74 | - } | |
75 | + | |
76 | read_unlock_irqrestore(&zfcp_data.config_lock, flags); | |
77 | } | |
78 | ||
79 | @@ -375,8 +369,10 @@ static void zfcp_fc_adisc_handler(unsign | |
80 | if (!port->wwnn) | |
81 | port->wwnn = ls_adisc->wwnn; | |
82 | ||
83 | - if (port->wwpn != ls_adisc->wwpn) | |
84 | - zfcp_erp_port_reopen(port, 0, 64, NULL); | |
85 | + if ((port->wwpn != ls_adisc->wwpn) || | |
86 | + !(atomic_read(&port->status) & ZFCP_STATUS_COMMON_OPEN)) | |
87 | + zfcp_erp_port_reopen(port, ZFCP_STATUS_COMMON_ERP_FAILED, 64, | |
88 | + NULL); | |
89 | ||
90 | out: | |
91 | zfcp_port_put(port); |