Skip to contentSkip to conversation

IPMI: Hold ATTN until upper layer ready

PATCH In review Corey Minyard 1 participant 1 message Feb 13, 2008 IPMI

lore
Share & tools
lore
#0 lore raw

PATCH 1/8 IPMI: Hold ATTN until upper layer ready

From: Corey Minyard <[email protected]>

Hold handling of ATTN until the upper layer has reported that it is ready.

Cc Patrick Schoeller <[email protected]>

---

drivers/char/ipmi/ipmi_si_intf.c +5 -2
Index: linux-2.6.24/drivers/char/ipmi/ipmi_si_intf.c
===================================================================
@@ -723,8 +723,11 @@ static enum si_sm_result smi_event_handl
 		si_sm_result = smi_info->handlers->event(smi_info->si_sm, 0);
 	}
 
-	/* We prefer handling attn over new messages. */
-	if (si_sm_result == SI_SM_ATTN)
+	/*
+	 * We prefer handling attn over new messages.  But don't do
+	 * this if there is not yet an upper layer to handle anything.
+	 */
+	if (likely(smi_info->intf) && si_sm_result == SI_SM_ATTN)
 	{
 		unsigned char msg[2];