/[packages]/updates/5/kernel/current/PATCHES/patches/Revert-ipmi-Start-the-timer-and-thread-on-internal-m.patch
ViewVC logotype

Contents of /updates/5/kernel/current/PATCHES/patches/Revert-ipmi-Start-the-timer-and-thread-on-internal-m.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 988870 - (show annotations) (download)
Thu Mar 10 19:47:27 2016 UTC (8 years, 1 month ago) by tmb
File size: 6657 byte(s)
- update to 4.4.5
- x86/mm: Fix slow_virt_to_phys() for X86_PAE again
- Revert "drm/radeon: call hpd_irq_event on resume"
- Revert "drm/radeon/pm: adjust display configuration after powerstate"
- Revert "ipmi: Start the timer and thread on internal msgs"
  (fixes hard lock on Dell R720xd)


1 From 43034bc4606f1f21186ca6fe27bc0448159d5e00 Mon Sep 17 00:00:00 2001
2 From: Thomas Backlund <tmb@mageia.org>
3 Date: Thu, 10 Mar 2016 15:44:13 +0200
4 Subject: [PATCH] Revert "ipmi: Start the timer and thread on internal msgs"
5
6 This reverts commit 0cfec916e86d881e209de4b4ae9959a6271e6660.
7
8 It's reported on ipmi list that Dell R720xd servers will always panic
9 on dell ipmi services load
10
11 Reverting this fixes the issue.
12
13 Signed-off-by: Thomas Backlund <tmb@mageia.org>
14
15 ---
16 drivers/char/ipmi/ipmi_si_intf.c | 73 ++++++++++++++++------------------------
17 1 file changed, 29 insertions(+), 44 deletions(-)
18
19 diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
20 index 4cc72fa..f667be8 100644
21 --- a/drivers/char/ipmi/ipmi_si_intf.c
22 +++ b/drivers/char/ipmi/ipmi_si_intf.c
23 @@ -412,42 +412,18 @@ static enum si_sm_result start_next_msg(struct smi_info *smi_info)
24 return rv;
25 }
26
27 -static void smi_mod_timer(struct smi_info *smi_info, unsigned long new_val)
28 -{
29 - smi_info->last_timeout_jiffies = jiffies;
30 - mod_timer(&smi_info->si_timer, new_val);
31 - smi_info->timer_running = true;
32 -}
33 -
34 -/*
35 - * Start a new message and (re)start the timer and thread.
36 - */
37 -static void start_new_msg(struct smi_info *smi_info, unsigned char *msg,
38 - unsigned int size)
39 -{
40 - smi_mod_timer(smi_info, jiffies + SI_TIMEOUT_JIFFIES);
41 -
42 - if (smi_info->thread)
43 - wake_up_process(smi_info->thread);
44 -
45 - smi_info->handlers->start_transaction(smi_info->si_sm, msg, size);
46 -}
47 -
48 -static void start_check_enables(struct smi_info *smi_info, bool start_timer)
49 +static void start_check_enables(struct smi_info *smi_info)
50 {
51 unsigned char msg[2];
52
53 msg[0] = (IPMI_NETFN_APP_REQUEST << 2);
54 msg[1] = IPMI_GET_BMC_GLOBAL_ENABLES_CMD;
55
56 - if (start_timer)
57 - start_new_msg(smi_info, msg, 2);
58 - else
59 - smi_info->handlers->start_transaction(smi_info->si_sm, msg, 2);
60 + smi_info->handlers->start_transaction(smi_info->si_sm, msg, 2);
61 smi_info->si_state = SI_CHECKING_ENABLES;
62 }
63
64 -static void start_clear_flags(struct smi_info *smi_info, bool start_timer)
65 +static void start_clear_flags(struct smi_info *smi_info)
66 {
67 unsigned char msg[3];
68
69 @@ -456,10 +432,7 @@ static void start_clear_flags(struct smi_info *smi_info, bool start_timer)
70 msg[1] = IPMI_CLEAR_MSG_FLAGS_CMD;
71 msg[2] = WDT_PRE_TIMEOUT_INT;
72
73 - if (start_timer)
74 - start_new_msg(smi_info, msg, 3);
75 - else
76 - smi_info->handlers->start_transaction(smi_info->si_sm, msg, 3);
77 + smi_info->handlers->start_transaction(smi_info->si_sm, msg, 3);
78 smi_info->si_state = SI_CLEARING_FLAGS;
79 }
80
81 @@ -469,8 +442,10 @@ static void start_getting_msg_queue(struct smi_info *smi_info)
82 smi_info->curr_msg->data[1] = IPMI_GET_MSG_CMD;
83 smi_info->curr_msg->data_size = 2;
84
85 - start_new_msg(smi_info, smi_info->curr_msg->data,
86 - smi_info->curr_msg->data_size);
87 + smi_info->handlers->start_transaction(
88 + smi_info->si_sm,
89 + smi_info->curr_msg->data,
90 + smi_info->curr_msg->data_size);
91 smi_info->si_state = SI_GETTING_MESSAGES;
92 }
93
94 @@ -480,11 +455,20 @@ static void start_getting_events(struct smi_info *smi_info)
95 smi_info->curr_msg->data[1] = IPMI_READ_EVENT_MSG_BUFFER_CMD;
96 smi_info->curr_msg->data_size = 2;
97
98 - start_new_msg(smi_info, smi_info->curr_msg->data,
99 - smi_info->curr_msg->data_size);
100 + smi_info->handlers->start_transaction(
101 + smi_info->si_sm,
102 + smi_info->curr_msg->data,
103 + smi_info->curr_msg->data_size);
104 smi_info->si_state = SI_GETTING_EVENTS;
105 }
106
107 +static void smi_mod_timer(struct smi_info *smi_info, unsigned long new_val)
108 +{
109 + smi_info->last_timeout_jiffies = jiffies;
110 + mod_timer(&smi_info->si_timer, new_val);
111 + smi_info->timer_running = true;
112 +}
113 +
114 /*
115 * When we have a situtaion where we run out of memory and cannot
116 * allocate messages, we just leave them in the BMC and run the system
117 @@ -494,11 +478,11 @@ static void start_getting_events(struct smi_info *smi_info)
118 * Note that we cannot just use disable_irq(), since the interrupt may
119 * be shared.
120 */
121 -static inline bool disable_si_irq(struct smi_info *smi_info, bool start_timer)
122 +static inline bool disable_si_irq(struct smi_info *smi_info)
123 {
124 if ((smi_info->irq) && (!smi_info->interrupt_disabled)) {
125 smi_info->interrupt_disabled = true;
126 - start_check_enables(smi_info, start_timer);
127 + start_check_enables(smi_info);
128 return true;
129 }
130 return false;
131 @@ -508,7 +492,7 @@ static inline bool enable_si_irq(struct smi_info *smi_info)
132 {
133 if ((smi_info->irq) && (smi_info->interrupt_disabled)) {
134 smi_info->interrupt_disabled = false;
135 - start_check_enables(smi_info, true);
136 + start_check_enables(smi_info);
137 return true;
138 }
139 return false;
140 @@ -526,7 +510,7 @@ static struct ipmi_smi_msg *alloc_msg_handle_irq(struct smi_info *smi_info)
141
142 msg = ipmi_alloc_smi_msg();
143 if (!msg) {
144 - if (!disable_si_irq(smi_info, true))
145 + if (!disable_si_irq(smi_info))
146 smi_info->si_state = SI_NORMAL;
147 } else if (enable_si_irq(smi_info)) {
148 ipmi_free_smi_msg(msg);
149 @@ -542,7 +526,7 @@ static void handle_flags(struct smi_info *smi_info)
150 /* Watchdog pre-timeout */
151 smi_inc_stat(smi_info, watchdog_pretimeouts);
152
153 - start_clear_flags(smi_info, true);
154 + start_clear_flags(smi_info);
155 smi_info->msg_flags &= ~WDT_PRE_TIMEOUT_INT;
156 if (smi_info->intf)
157 ipmi_smi_watchdog_pretimeout(smi_info->intf);
158 @@ -895,7 +879,8 @@ static enum si_sm_result smi_event_handler(struct smi_info *smi_info,
159 msg[0] = (IPMI_NETFN_APP_REQUEST << 2);
160 msg[1] = IPMI_GET_MSG_FLAGS_CMD;
161
162 - start_new_msg(smi_info, msg, 2);
163 + smi_info->handlers->start_transaction(
164 + smi_info->si_sm, msg, 2);
165 smi_info->si_state = SI_GETTING_FLAGS;
166 goto restart;
167 }
168 @@ -925,7 +910,7 @@ static enum si_sm_result smi_event_handler(struct smi_info *smi_info,
169 * disable and messages disabled.
170 */
171 if (smi_info->supports_event_msg_buff || smi_info->irq) {
172 - start_check_enables(smi_info, true);
173 + start_check_enables(smi_info);
174 } else {
175 smi_info->curr_msg = alloc_msg_handle_irq(smi_info);
176 if (!smi_info->curr_msg)
177 @@ -3635,7 +3620,7 @@ static int try_smi_init(struct smi_info *new_smi)
178 * Start clearing the flags before we enable interrupts or the
179 * timer to avoid racing with the timer.
180 */
181 - start_clear_flags(new_smi, false);
182 + start_clear_flags(new_smi);
183
184 /*
185 * IRQ is defined to be set when non-zero. req_events will
186 @@ -3930,7 +3915,7 @@ static void cleanup_one_si(struct smi_info *to_clean)
187 poll(to_clean);
188 schedule_timeout_uninterruptible(1);
189 }
190 - disable_si_irq(to_clean, false);
191 + disable_si_irq(to_clean);
192 while (to_clean->curr_msg || (to_clean->si_state != SI_NORMAL)) {
193 poll(to_clean);
194 schedule_timeout_uninterruptible(1);
195 --
196 2.7.2
197

  ViewVC Help
Powered by ViewVC 1.1.30