[<prev] [next>] [day] [month] [year] [list]
Message-id: <20080213162053.GA9830@minyard.local>
Date:	Wed, 13 Feb 2008 10:20:53 -0600
From:	Corey Minyard <minyard@....org>
To:	Linux Kernel <linux-kernel@...r.kernel.org>
Cc:	Andrew Morton <akpm@...l.org>,
	Patrick Schoeller <Patrick.Schoeller@...com>,
	OpenIPMI Developers <openipmi-developer@...ts.sourceforge.net>
Subject: [PATCH 1/8] IPMI: Hold ATTN until upper layer ready
From: Corey Minyard <cminyard@...sta.com>
Hold handling of ATTN until the upper layer has reported that it is
ready.
Signed-off-by: Corey Minyard <cminyard@...sta.com>
Cc: Patrick Schoeller <Patrick.Schoeller@...com>
---
Index: linux-2.6.24/drivers/char/ipmi/ipmi_si_intf.c
===================================================================
--- linux-2.6.24.orig/drivers/char/ipmi/ipmi_si_intf.c
+++ 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];
 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Powered by blists - more mailing lists