Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ipmi: Set a timer for maintenance mode

Now that maintenance mode rejects all messages, there's nothing to
run time timer. Make sure the timer is running in maintenance mode.

Signed-off-by: Corey Minyard <corey@minyard.net>
Tested-by: Frederick Lawler <fred@cloudflare.com>

+6 -2
+6 -2
drivers/char/ipmi/ipmi_msghandler.c
··· 52 52 static bool initialized; 53 53 static bool drvregistered; 54 54 55 + static struct timer_list ipmi_timer; 56 + 55 57 /* Numbers in this enumerator should be mapped to ipmi_panic_event_str */ 56 58 enum ipmi_panic_event_op { 57 59 IPMI_SEND_PANIC_EVENT_NONE, ··· 1945 1943 && intf->maintenance_mode_state < newst) { 1946 1944 intf->maintenance_mode_state = newst; 1947 1945 maintenance_mode_update(intf); 1946 + mod_timer(&ipmi_timer, jiffies + IPMI_TIMEOUT_JIFFIES); 1948 1947 } 1949 1948 spin_unlock_irqrestore(&intf->maintenance_mode_lock, 1950 1949 flags); ··· 5084 5081 && (intf->auto_maintenance_timeout <= 0)) { 5085 5082 intf->maintenance_mode_state = 5086 5083 IPMI_MAINTENANCE_MODE_STATE_OFF; 5084 + intf->auto_maintenance_timeout = 0; 5087 5085 maintenance_mode_update(intf); 5088 5086 } 5089 5087 } ··· 5106 5102 if (!intf->in_shutdown) 5107 5103 intf->handlers->request_events(intf->send_info); 5108 5104 } 5109 - 5110 - static struct timer_list ipmi_timer; 5111 5105 5112 5106 static atomic_t stop_operation; 5113 5107 ··· 5130 5128 } 5131 5129 need_timer = true; 5132 5130 } 5131 + if (intf->maintenance_mode_state) 5132 + need_timer = true; 5133 5133 5134 5134 need_timer |= ipmi_timeout_handler(intf, IPMI_TIMEOUT_TIME); 5135 5135 }