diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2018-07-04 10:04:45 -0400 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2018-07-04 10:04:45 -0400 |
commit | 8b9c5befaaca1197d36f0e6654ae952e9cbff4f5 (patch) | |
tree | b69972caa047543e2248e0bebfa2b95fee31baca | |
parent | 6ab8f277d043a015718ca6b454192a11d3e86e71 (diff) | |
download | longterm-queue-4.12-8b9c5befaaca1197d36f0e6654ae952e9cbff4f5.tar.gz |
ipmi: context and indent refresh
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r-- | queue/ipmi-Stop-timers-before-cleaning-up-the-module.patch | 53 |
1 files changed, 27 insertions, 26 deletions
diff --git a/queue/ipmi-Stop-timers-before-cleaning-up-the-module.patch b/queue/ipmi-Stop-timers-before-cleaning-up-the-module.patch index 5ef6747..86801a7 100644 --- a/queue/ipmi-Stop-timers-before-cleaning-up-the-module.patch +++ b/queue/ipmi-Stop-timers-before-cleaning-up-the-module.patch @@ -1,4 +1,4 @@ -From 4f7f5551a760eb0124267be65763008169db7087 Mon Sep 17 00:00:00 2001 +From a099617d84a9e06e91ff61aac0278042dce58c9e Mon Sep 17 00:00:00 2001 From: Masamitsu Yamazaki <m-yamazaki@ah.jp.nec.com> Date: Wed, 15 Nov 2017 07:33:14 +0000 Subject: [PATCH] ipmi: Stop timers before cleaning up the module @@ -78,12 +78,13 @@ Fixes: 0cfec916e86d ("ipmi: Start the timer and thread on internal msgs") Signed-off-by: Yamazaki Masamitsu <m-yamazaki@ah.jp.nec.com> [Adjusted for recent changes in the driver.] Signed-off-by: Corey Minyard <cminyard@mvista.com> +Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c -index 71d33a1807e4..99b0513bb55b 100644 +index 59ee93ea84eb..c7d95fd2f5b2 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c -@@ -199,6 +199,9 @@ struct smi_info { +@@ -241,6 +241,9 @@ struct smi_info { /* The timer for this si. */ struct timer_list si_timer; @@ -93,7 +94,7 @@ index 71d33a1807e4..99b0513bb55b 100644 /* This flag is set, if the timer is running (timer_pending() isn't enough) */ bool timer_running; -@@ -355,6 +358,8 @@ out: +@@ -416,6 +419,8 @@ static enum si_sm_result start_next_msg(struct smi_info *smi_info) static void smi_mod_timer(struct smi_info *smi_info, unsigned long new_val) { @@ -102,7 +103,7 @@ index 71d33a1807e4..99b0513bb55b 100644 smi_info->last_timeout_jiffies = jiffies; mod_timer(&smi_info->si_timer, new_val); smi_info->timer_running = true; -@@ -374,21 +379,18 @@ static void start_new_msg(struct smi_info *smi_info, unsigned char *msg, +@@ -435,21 +440,18 @@ static void start_new_msg(struct smi_info *smi_info, unsigned char *msg, smi_info->handlers->start_transaction(smi_info->si_sm, msg, size); } @@ -127,7 +128,7 @@ index 71d33a1807e4..99b0513bb55b 100644 { unsigned char msg[3]; -@@ -397,10 +399,7 @@ static void start_clear_flags(struct smi_info *smi_info, bool start_timer) +@@ -458,10 +460,7 @@ static void start_clear_flags(struct smi_info *smi_info, bool start_timer) msg[1] = IPMI_CLEAR_MSG_FLAGS_CMD; msg[2] = WDT_PRE_TIMEOUT_INT; @@ -139,30 +140,30 @@ index 71d33a1807e4..99b0513bb55b 100644 smi_info->si_state = SI_CLEARING_FLAGS; } -@@ -435,11 +434,11 @@ static void start_getting_events(struct smi_info *smi_info) +@@ -496,11 +495,11 @@ static void start_getting_events(struct smi_info *smi_info) * Note that we cannot just use disable_irq(), since the interrupt may * be shared. */ -static inline bool disable_si_irq(struct smi_info *smi_info, bool start_timer) +static inline bool disable_si_irq(struct smi_info *smi_info) { - if ((smi_info->io.irq) && (!smi_info->interrupt_disabled)) { + if ((smi_info->irq) && (!smi_info->interrupt_disabled)) { smi_info->interrupt_disabled = true; - start_check_enables(smi_info, start_timer); + start_check_enables(smi_info); return true; } return false; -@@ -449,7 +448,7 @@ static inline bool enable_si_irq(struct smi_info *smi_info) +@@ -510,7 +509,7 @@ static inline bool enable_si_irq(struct smi_info *smi_info) { - if ((smi_info->io.irq) && (smi_info->interrupt_disabled)) { + if ((smi_info->irq) && (smi_info->interrupt_disabled)) { smi_info->interrupt_disabled = false; - start_check_enables(smi_info, true); + start_check_enables(smi_info); return true; } return false; -@@ -467,7 +466,7 @@ static struct ipmi_smi_msg *alloc_msg_handle_irq(struct smi_info *smi_info) +@@ -528,7 +527,7 @@ static struct ipmi_smi_msg *alloc_msg_handle_irq(struct smi_info *smi_info) msg = ipmi_alloc_smi_msg(); if (!msg) { @@ -171,7 +172,7 @@ index 71d33a1807e4..99b0513bb55b 100644 smi_info->si_state = SI_NORMAL; } else if (enable_si_irq(smi_info)) { ipmi_free_smi_msg(msg); -@@ -483,7 +482,7 @@ retry: +@@ -544,7 +543,7 @@ static void handle_flags(struct smi_info *smi_info) /* Watchdog pre-timeout */ smi_inc_stat(smi_info, watchdog_pretimeouts); @@ -180,16 +181,16 @@ index 71d33a1807e4..99b0513bb55b 100644 smi_info->msg_flags &= ~WDT_PRE_TIMEOUT_INT; if (smi_info->intf) ipmi_smi_watchdog_pretimeout(smi_info->intf); -@@ -866,7 +865,7 @@ restart: +@@ -927,7 +926,7 @@ static enum si_sm_result smi_event_handler(struct smi_info *smi_info, * disable and messages disabled. */ - if (smi_info->supports_event_msg_buff || smi_info->io.irq) { + if (smi_info->supports_event_msg_buff || smi_info->irq) { - start_check_enables(smi_info, true); + start_check_enables(smi_info); } else { smi_info->curr_msg = alloc_msg_handle_irq(smi_info); if (!smi_info->curr_msg) -@@ -1167,6 +1166,7 @@ static int smi_start_processing(void *send_info, +@@ -1234,6 +1233,7 @@ static int smi_start_processing(void *send_info, /* Set up the timer that drives the interface. */ setup_timer(&new_smi->si_timer, smi_timeout, (long)new_smi); @@ -197,7 +198,7 @@ index 71d33a1807e4..99b0513bb55b 100644 smi_mod_timer(new_smi, jiffies + SI_TIMEOUT_JIFFIES); /* Try to claim any interrupts. */ -@@ -1936,10 +1936,12 @@ static void check_for_broken_irqs(struct smi_info *smi_info) +@@ -3437,10 +3437,12 @@ static void check_for_broken_irqs(struct smi_info *smi_info) check_set_rcv_irq(smi_info); } @@ -211,7 +212,7 @@ index 71d33a1807e4..99b0513bb55b 100644 if (smi_info->timer_running) del_timer_sync(&smi_info->si_timer); } -@@ -2152,7 +2154,7 @@ static int try_smi_init(struct smi_info *new_smi) +@@ -3614,7 +3616,7 @@ static int try_smi_init(struct smi_info *new_smi) * Start clearing the flags before we enable interrupts or the * timer to avoid racing with the timer. */ @@ -220,8 +221,8 @@ index 71d33a1807e4..99b0513bb55b 100644 /* * IRQ is defined to be set when non-zero. req_events will -@@ -2238,7 +2240,7 @@ out_err_remove_attrs: - dev_set_drvdata(new_smi->io.dev, NULL); +@@ -3683,7 +3685,7 @@ static int try_smi_init(struct smi_info *new_smi) + return 0; out_err_stop_timer: - wait_for_timer_and_thread(new_smi); @@ -229,21 +230,21 @@ index 71d33a1807e4..99b0513bb55b 100644 out_err: new_smi->interrupt_disabled = true; -@@ -2388,7 +2390,7 @@ static void cleanup_one_si(struct smi_info *to_clean) +@@ -3880,7 +3882,7 @@ static void cleanup_one_si(struct smi_info *to_clean) */ - if (to_clean->io.irq_cleanup) - to_clean->io.irq_cleanup(&to_clean->io); + if (to_clean->irq_cleanup) + to_clean->irq_cleanup(to_clean); - wait_for_timer_and_thread(to_clean); + stop_timer_and_thread(to_clean); /* * Timeouts are stopped, now make sure the interrupts are off -@@ -2400,7 +2402,7 @@ static void cleanup_one_si(struct smi_info *to_clean) +@@ -3891,7 +3893,7 @@ static void cleanup_one_si(struct smi_info *to_clean) + poll(to_clean); schedule_timeout_uninterruptible(1); } - if (to_clean->handlers) -- disable_si_irq(to_clean, false); -+ disable_si_irq(to_clean); +- disable_si_irq(to_clean, false); ++ disable_si_irq(to_clean); while (to_clean->curr_msg || (to_clean->si_state != SI_NORMAL)) { poll(to_clean); schedule_timeout_uninterruptible(1); |