diff options
author | Corey Minyard <cminyard@mvista.com> | 2009-05-20 14:36:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-05-22 10:30:41 -0400 |
commit | 9a2845c453d170e4e9b1437fa671dbf39b0e7bd8 (patch) | |
tree | 7b7e923f27d244035be463d5abd85b652c949cd1 /drivers | |
parent | 98f32602d42951e61a059685f842aa7d778ffab0 (diff) |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/ipmi/ipmi_msghandler.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index aa83a0865ec1..09050797c76a 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c | |||
@@ -2856,6 +2856,7 @@ int ipmi_register_smi(struct ipmi_smi_handlers *handlers, | |||
2856 | /* Assume a single IPMB channel at zero. */ | 2856 | /* Assume a single IPMB channel at zero. */ |
2857 | intf->channels[0].medium = IPMI_CHANNEL_MEDIUM_IPMB; | 2857 | intf->channels[0].medium = IPMI_CHANNEL_MEDIUM_IPMB; |
2858 | intf->channels[0].protocol = IPMI_CHANNEL_PROTOCOL_IPMB; | 2858 | intf->channels[0].protocol = IPMI_CHANNEL_PROTOCOL_IPMB; |
2859 | intf->curr_channel = IPMI_MAX_CHANNELS; | ||
2859 | } | 2860 | } |
2860 | 2861 | ||
2861 | if (rv == 0) | 2862 | if (rv == 0) |
@@ -3648,13 +3649,13 @@ static int handle_new_recv_msg(ipmi_smi_t intf, | |||
3648 | } | 3649 | } |
3649 | 3650 | ||
3650 | /* | 3651 | /* |
3651 | ** We need to make sure the channels have been initialized. | 3652 | * We need to make sure the channels have been initialized. |
3652 | ** The channel_handler routine will set the "curr_channel" | 3653 | * The channel_handler routine will set the "curr_channel" |
3653 | ** equal to or greater than IPMI_MAX_CHANNELS when all the | 3654 | * equal to or greater than IPMI_MAX_CHANNELS when all the |
3654 | ** channels for this interface have been initialized. | 3655 | * channels for this interface have been initialized. |
3655 | */ | 3656 | */ |
3656 | if (intf->curr_channel < IPMI_MAX_CHANNELS) { | 3657 | if (intf->curr_channel < IPMI_MAX_CHANNELS) { |
3657 | requeue = 1; /* Just put the message back for now */ | 3658 | requeue = 0; /* Throw the message away */ |
3658 | goto out; | 3659 | goto out; |
3659 | } | 3660 | } |
3660 | 3661 | ||