]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.39/patches.arch/s390-15-01-zfcp-erp-escalation.patch
Fix oinkmaster patch.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.arch / s390-15-01-zfcp-erp-escalation.patch
CommitLineData
2cb7cef9
BS
1From: Gerald Schaefer <geraldsc@de.ibm.com>
2Subject: zfcp: Fix erp escalation procedure
3References: bnc#518291,LTC#54456
4
5Symptom: After a failure the zfcp erp gives up.
6Problem: When a zfcp erp step fails the zfcp erp might end without
7 setting the driver internal flags appropriately.
8Solution: Fix the erp escalation procedure. If a erp action fails,
9 retry it until the retry counter exceeds. This ensures
10 that the erp continues or the failed flag is set
11 correctly. If for some reason another action is
12 necessary, this will be triggered from outside the erp,
13 to avoid global recoveries for single port failures.
14
15Acked-by: John Jolly <jjolly@suse.de>
16---
17 drivers/s390/scsi/zfcp_dbf.c | 8 ++----
18 drivers/s390/scsi/zfcp_erp.c | 50 ++++++++++++++++++++-----------------------
19 2 files changed, 27 insertions(+), 31 deletions(-)
20
21--- a/drivers/s390/scsi/zfcp_erp.c 2009-06-23 10:45:52.000000000 +0200
22+++ b/drivers/s390/scsi/zfcp_erp.c 2009-06-23 14:13:30.000000000 +0200
23@@ -549,40 +549,35 @@ static void _zfcp_erp_unit_reopen_all(st
24 _zfcp_erp_unit_reopen(unit, clear, id, ref);
25 }
26
27-static void zfcp_erp_strategy_followup_actions(struct zfcp_erp_action *act)
28+static void zfcp_erp_strategy_followup_failed(struct zfcp_erp_action *act)
29 {
30- struct zfcp_adapter *adapter = act->adapter;
31- struct zfcp_port *port = act->port;
32- struct zfcp_unit *unit = act->unit;
33- u32 status = act->status;
34-
35- /* initiate follow-up actions depending on success of finished action */
36 switch (act->action) {
37-
38 case ZFCP_ERP_ACTION_REOPEN_ADAPTER:
39- if (status == ZFCP_ERP_SUCCEEDED)
40- _zfcp_erp_port_reopen_all(adapter, 0, 70, NULL);
41- else
42- _zfcp_erp_adapter_reopen(adapter, 0, 71, NULL);
43+ _zfcp_erp_adapter_reopen(act->adapter, 0, 71, NULL);
44 break;
45-
46 case ZFCP_ERP_ACTION_REOPEN_PORT_FORCED:
47- if (status == ZFCP_ERP_SUCCEEDED)
48- _zfcp_erp_port_reopen(port, 0, 72, NULL);
49- else
50- _zfcp_erp_adapter_reopen(adapter, 0, 73, NULL);
51+ _zfcp_erp_port_forced_reopen(act->port, 0, 73, NULL);
52 break;
53-
54 case ZFCP_ERP_ACTION_REOPEN_PORT:
55- if (status == ZFCP_ERP_SUCCEEDED)
56- _zfcp_erp_unit_reopen_all(port, 0, 74, NULL);
57- else
58- _zfcp_erp_port_forced_reopen(port, 0, 75, NULL);
59+ _zfcp_erp_port_reopen(act->port, 0, 75, NULL);
60 break;
61-
62 case ZFCP_ERP_ACTION_REOPEN_UNIT:
63- if (status != ZFCP_ERP_SUCCEEDED)
64- _zfcp_erp_port_reopen(unit->port, 0, 76, NULL);
65+ _zfcp_erp_unit_reopen(act->unit, 0, 76, NULL);
66+ break;
67+ }
68+}
69+
70+static void zfcp_erp_strategy_followup_success(struct zfcp_erp_action *act)
71+{
72+ switch (act->action) {
73+ case ZFCP_ERP_ACTION_REOPEN_ADAPTER:
74+ _zfcp_erp_port_reopen_all(act->adapter, 0, 70, NULL);
75+ break;
76+ case ZFCP_ERP_ACTION_REOPEN_PORT_FORCED:
77+ _zfcp_erp_port_reopen(act->port, 0, 72, NULL);
78+ break;
79+ case ZFCP_ERP_ACTION_REOPEN_PORT:
80+ _zfcp_erp_unit_reopen_all(act->port, 0, 74, NULL);
81 break;
82 }
83 }
84@@ -1297,7 +1292,10 @@ static int zfcp_erp_strategy(struct zfcp
85 retval = zfcp_erp_strategy_statechange(erp_action, retval);
86 if (retval == ZFCP_ERP_EXIT)
87 goto unlock;
88- zfcp_erp_strategy_followup_actions(erp_action);
89+ if (retval == ZFCP_ERP_SUCCEEDED)
90+ zfcp_erp_strategy_followup_success(erp_action);
91+ if (retval == ZFCP_ERP_FAILED)
92+ zfcp_erp_strategy_followup_failed(erp_action);
93
94 unlock:
95 write_unlock(&adapter->erp_lock);
96--- a/drivers/s390/scsi/zfcp_dbf.c 2009-06-23 10:45:52.000000000 +0200
97+++ b/drivers/s390/scsi/zfcp_dbf.c 2009-06-23 14:20:41.000000000 +0200
98@@ -563,12 +563,10 @@ static const char *zfcp_rec_dbf_ids[] =
99 [71] = "adapter recovery escalation after failed adapter recovery",
100 [72] = "port recovery follow-up after successful physical port "
101 "recovery",
102- [73] = "adapter recovery escalation after failed physical port "
103- "recovery",
104+ [73] = "physical port recovery retry after failure",
105 [74] = "unit recovery follow-up after successful port recovery",
106- [75] = "physical port recovery escalation after failed port "
107- "recovery",
108- [76] = "port recovery escalation after failed unit recovery",
109+ [75] = "port recovery retry after failure",
110+ [76] = "unit recovery retry after failure",
111 [77] = "",
112 [78] = "duplicate request id",
113 [79] = "link down",