From: Atish Patra Date: Tue, 30 May 2017 17:57:31 +0000 (-0600) Subject: ipmi: Edit ambiguous error message for unknown command X-Git-Tag: v4.1.12-102.0.20170601_1400~215 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=3642ac2e1e1526bef56586047e5fe68daeacfd97;p=users%2Fjedix%2Flinux-maple.git ipmi: Edit ambiguous error message for unknown command IPMI SI interfaces issues clear flag command irrespective of underlying physical interface. In case the platform does not recognize this command, it returns correct response unknown command (0xc1). However, SI interface prints this as if it is an error, and this leads to ambiguity. This should only be an info message in case of unknown command and a warning if platform returns some other error response. Edit the message to clear the ambiguity. Orabug: 25461958 Signed-off-by: Atish Patra Reviewed-by: Rob Gardner Reviewed-by: Shannon Nelson Reviewed-by: Dave Kleikamp (cherry picked from commit 0f6bfff7803dacb7ebfd765d6a2beb54e018698a) Conflicts: drivers/char/ipmi/ipmi_si_intf.c --- diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index ce0ca691512e5..58cdd66120004 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c @@ -643,11 +643,13 @@ static void handle_transaction_done(struct smi_info *smi_info) /* We cleared the flags. */ smi_info->handlers->get_result(smi_info->si_sm, msg, 3); - if (msg[2] != 0) { - /* Error clearing flags */ + if (msg[2] == IPMI_INVALID_COMMAND_ERR) + dev_info(smi_info->dev, + "clearing flags command not recognized by SP"); + else if (msg[2] != IPMI_CC_NO_ERROR) dev_warn(smi_info->dev, - "Error clearing flags: %2.2x\n", msg[2]); - } + "Warning: error clearing flags: %2.2x\n", + msg[2]); smi_info->si_state = SI_NORMAL; break; }