ipmi: fix ipmi_si modprobe hang

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>

authored by Corey Minyard and committed by Linus Torvalds 9a2845c4 98f32602

+7 -6
+7 -6
drivers/char/ipmi/ipmi_msghandler.c
··· 2856 2856 /* Assume a single IPMB channel at zero. */ 2857 2857 intf->channels[0].medium = IPMI_CHANNEL_MEDIUM_IPMB; 2858 2858 intf->channels[0].protocol = IPMI_CHANNEL_PROTOCOL_IPMB; 2859 + intf->curr_channel = IPMI_MAX_CHANNELS; 2859 2860 } 2860 2861 2861 2862 if (rv == 0) ··· 3649 3648 } 3650 3649 3651 3650 /* 3652 - ** We need to make sure the channels have been initialized. 3653 - ** The channel_handler routine will set the "curr_channel" 3654 - ** equal to or greater than IPMI_MAX_CHANNELS when all the 3655 - ** channels for this interface have been initialized. 3656 - */ 3651 + * We need to make sure the channels have been initialized. 3652 + * The channel_handler routine will set the "curr_channel" 3653 + * equal to or greater than IPMI_MAX_CHANNELS when all the 3654 + * channels for this interface have been initialized. 3655 + */ 3657 3656 if (intf->curr_channel < IPMI_MAX_CHANNELS) { 3658 - requeue = 1; /* Just put the message back for now */ 3657 + requeue = 0; /* Throw the message away */ 3659 3658 goto out; 3660 3659 } 3661 3660