From 3642ac2e1e1526bef56586047e5fe68daeacfd97 Mon Sep 17 00:00:00 2001 From: Atish Patra Date: Tue, 30 May 2017 11:57:31 -0600 Subject: [PATCH] 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 --- drivers/char/ipmi/ipmi_si_intf.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index ce0ca691512e..58cdd6612000 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; } -- 2.50.1