aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/ipmi/ipmi_msghandler.c
diff options
context:
space:
mode:
authorCorey Minyard <cminyard@mvista.com>2014-10-06 15:17:50 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-10-07 13:22:32 -0400
commit1f6684235825684b6257b7169b122011494c8a4d (patch)
tree48be8d53b5a7902cc96e291647101a43d80f601b /drivers/char/ipmi/ipmi_msghandler.c
parentbfe01a5ba2490f299e1d2d5508cbbbadd897bbe9 (diff)
ipmi: Clean up the error handling for channel config errors
The code to send the channel config errors was missing an error report in one place and needed some more information in another, and had an extraneous bit of code. Clean all that up. Signed-off-by: Corey Minyard <cminyard@mvista.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/ipmi/ipmi_msghandler.c')
-rw-r--r--drivers/char/ipmi/ipmi_msghandler.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
index e6db9381b2c7..f816211f062f 100644
--- a/drivers/char/ipmi/ipmi_msghandler.c
+++ b/drivers/char/ipmi/ipmi_msghandler.c
@@ -2796,7 +2796,6 @@ channel_handler(ipmi_smi_t intf, struct ipmi_recv_msg *msg)
2796 = IPMI_CHANNEL_MEDIUM_IPMB; 2796 = IPMI_CHANNEL_MEDIUM_IPMB;
2797 intf->channels[0].protocol 2797 intf->channels[0].protocol
2798 = IPMI_CHANNEL_PROTOCOL_IPMB; 2798 = IPMI_CHANNEL_PROTOCOL_IPMB;
2799 rv = -ENOSYS;
2800 2799
2801 intf->curr_channel = IPMI_MAX_CHANNELS; 2800 intf->curr_channel = IPMI_MAX_CHANNELS;
2802 wake_up(&intf->waitq); 2801 wake_up(&intf->waitq);
@@ -2821,12 +2820,12 @@ channel_handler(ipmi_smi_t intf, struct ipmi_recv_msg *msg)
2821 2820
2822 if (rv) { 2821 if (rv) {
2823 /* Got an error somehow, just give up. */ 2822 /* Got an error somehow, just give up. */
2823 printk(KERN_WARNING PFX
2824 "Error sending channel information for channel"
2825 " %d: %d\n", intf->curr_channel, rv);
2826
2824 intf->curr_channel = IPMI_MAX_CHANNELS; 2827 intf->curr_channel = IPMI_MAX_CHANNELS;
2825 wake_up(&intf->waitq); 2828 wake_up(&intf->waitq);
2826
2827 printk(KERN_WARNING PFX
2828 "Error sending channel information: %d\n",
2829 rv);
2830 } 2829 }
2831 } 2830 }
2832 out: 2831 out:
@@ -2964,8 +2963,12 @@ int ipmi_register_smi(struct ipmi_smi_handlers *handlers,
2964 intf->null_user_handler = channel_handler; 2963 intf->null_user_handler = channel_handler;
2965 intf->curr_channel = 0; 2964 intf->curr_channel = 0;
2966 rv = send_channel_info_cmd(intf, 0); 2965 rv = send_channel_info_cmd(intf, 0);
2967 if (rv) 2966 if (rv) {
2967 printk(KERN_WARNING PFX
2968 "Error sending channel information for channel"
2969 " 0, %d\n", rv);
2968 goto out; 2970 goto out;
2971 }
2969 2972
2970 /* Wait for the channel info to be read. */ 2973 /* Wait for the channel info to be read. */
2971 wait_event(intf->waitq, 2974 wait_event(intf->waitq,