Skip to content

Commit f895e5d

Browse files
committed
ipmi:si: Don't block module unload if the BMC is messed up
If the BMC is in a bad state, don't bother waiting for queues messages since there can't be any. Otherwise the unload is blocked until the BMC is back in a good state. Reported-by: Rafael J. Wysocki <rafael@kernel.org> Fixes: bc3a9d2 ("ipmi:si: Gracefully handle if the BMC is non-functional") Cc: stable@vger.kernel.org # 4.18 Signed-off-by: Corey Minyard <corey@minyard.net> Reviewed-by: Rafael J. Wysocki (Intel) <rafael@kernel.org>
1 parent c3bb329 commit f895e5d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/char/ipmi/ipmi_si_intf.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2234,7 +2234,8 @@ static void wait_msg_processed(struct smi_info *smi_info)
22342234
unsigned long jiffies_now;
22352235
long time_diff;
22362236

2237-
while (smi_info->curr_msg || (smi_info->si_state != SI_NORMAL)) {
2237+
while (smi_info->si_state != SI_HOSED &&
2238+
(smi_info->curr_msg || (smi_info->si_state != SI_NORMAL))) {
22382239
jiffies_now = jiffies;
22392240
time_diff = (((long)jiffies_now - (long)smi_info->last_timeout_jiffies)
22402241
* SI_USEC_PER_JIFFY);

0 commit comments

Comments
 (0)