]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ipmi: hold ATTN until upper layer ready
authorCorey Minyard <cminyard@mvista.com>
Tue, 29 Apr 2008 08:01:01 +0000 (01:01 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 29 Apr 2008 15:06:14 +0000 (08:06 -0700)
Hold handling of ATTN until the upper layer has reported that it is
ready.

Signed-off-by: Corey Minyard <cminyard@mvista.com>
Cc: Patrick Schoeller <Patrick.Schoeller@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/ipmi/ipmi_si_intf.c

index 4f560d0bb8089fa296dadeaee3a21bfb7a91b052..1a8c1ca9055701b992b455fe5585802542593a0a 100644 (file)
@@ -723,8 +723,11 @@ static enum si_sm_result smi_event_handler(struct smi_info *smi_info,
                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];