]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
ipmi: fix ipmi_si modprobe hang
authorCorey Minyard <cminyard@mvista.com>
Wed, 20 May 2009 18:36:17 +0000 (13:36 -0500)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 22 May 2009 14:30:41 +0000 (07:30 -0700)
Instead of queuing IPMB messages before channel initialization, just
throw them away.  Nobody will be listening for them at this point,
anyway, and they will clog up the queue and nothing will be delivered
if we queue them.

Also set the current channel to the number of channels, as this value
is used to tell if the channel information has been initialized.

Signed-off-by: Corey Minyard <cminyard@mvista.com>
Cc: Ferenc Wagner <wferi@niif.hu>
Cc: Dan Frazier <dannf@hp.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/ipmi/ipmi_msghandler.c

index aa83a0865ec1d75abeddb9066a42aa5ea8ba1444..09050797c76a26546ca5fa2d4ed3e165cc9455b9 100644 (file)
@@ -2856,6 +2856,7 @@ int ipmi_register_smi(struct ipmi_smi_handlers *handlers,
                /* Assume a single IPMB channel at zero. */
                intf->channels[0].medium = IPMI_CHANNEL_MEDIUM_IPMB;
                intf->channels[0].protocol = IPMI_CHANNEL_PROTOCOL_IPMB;
+               intf->curr_channel = IPMI_MAX_CHANNELS;
        }
 
        if (rv == 0)
@@ -3648,13 +3649,13 @@ static int handle_new_recv_msg(ipmi_smi_t          intf,
                }
 
                /*
-               ** We need to make sure the channels have been initialized.
-               ** The channel_handler routine will set the "curr_channel"
-               ** equal to or greater than IPMI_MAX_CHANNELS when all the
-               ** channels for this interface have been initialized.
-               */
+                * We need to make sure the channels have been initialized.
+                * The channel_handler routine will set the "curr_channel"
+                * equal to or greater than IPMI_MAX_CHANNELS when all the
+                * channels for this interface have been initialized.
+                */
                if (intf->curr_channel < IPMI_MAX_CHANNELS) {
-                       requeue = 1;     /* Just put the message back for now */
+                       requeue = 0; /* Throw the message away */
                        goto out;
                }