diff options
author | Corey Minyard <cminyard@mvista.com> | 2013-05-16 15:04:26 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-16 16:49:25 -0400 |
commit | 0849bfece0199a345b0c5143d10cbc1dc228a60f (patch) | |
tree | 5c36dff776447f01b55ba02e59ba8054772a836e | |
parent | a5f2b3d6a738e7d4180012fe7b541172f8c8dcea (diff) |
ipmi: Improve error messages on failed irq enable
When the interrupt enable message returns an error, the messages are
not entirely accurate nor helpful. So improve them.
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | drivers/char/ipmi/ipmi_si_intf.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index 313538abe63c..af4b23ffc5a6 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c | |||
@@ -663,8 +663,10 @@ static void handle_transaction_done(struct smi_info *smi_info) | |||
663 | /* We got the flags from the SMI, now handle them. */ | 663 | /* We got the flags from the SMI, now handle them. */ |
664 | smi_info->handlers->get_result(smi_info->si_sm, msg, 4); | 664 | smi_info->handlers->get_result(smi_info->si_sm, msg, 4); |
665 | if (msg[2] != 0) { | 665 | if (msg[2] != 0) { |
666 | dev_warn(smi_info->dev, "Could not enable interrupts" | 666 | dev_warn(smi_info->dev, |
667 | ", failed get, using polled mode.\n"); | 667 | "Couldn't get irq info: %x.\n", msg[2]); |
668 | dev_warn(smi_info->dev, | ||
669 | "Maybe ok, but ipmi might run very slowly.\n"); | ||
668 | smi_info->si_state = SI_NORMAL; | 670 | smi_info->si_state = SI_NORMAL; |
669 | } else { | 671 | } else { |
670 | msg[0] = (IPMI_NETFN_APP_REQUEST << 2); | 672 | msg[0] = (IPMI_NETFN_APP_REQUEST << 2); |
@@ -685,10 +687,12 @@ static void handle_transaction_done(struct smi_info *smi_info) | |||
685 | 687 | ||
686 | /* We got the flags from the SMI, now handle them. */ | 688 | /* We got the flags from the SMI, now handle them. */ |
687 | smi_info->handlers->get_result(smi_info->si_sm, msg, 4); | 689 | smi_info->handlers->get_result(smi_info->si_sm, msg, 4); |
688 | if (msg[2] != 0) | 690 | if (msg[2] != 0) { |
689 | dev_warn(smi_info->dev, "Could not enable interrupts" | 691 | dev_warn(smi_info->dev, |
690 | ", failed set, using polled mode.\n"); | 692 | "Couldn't set irq info: %x.\n", msg[2]); |
691 | else | 693 | dev_warn(smi_info->dev, |
694 | "Maybe ok, but ipmi might run very slowly.\n"); | ||
695 | } else | ||
692 | smi_info->interrupt_disabled = 0; | 696 | smi_info->interrupt_disabled = 0; |
693 | smi_info->si_state = SI_NORMAL; | 697 | smi_info->si_state = SI_NORMAL; |
694 | break; | 698 | break; |