]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ipmi: Edit ambiguous error message for unknown command
authorAtish Patra <atish.patra@oracle.com>
Tue, 30 May 2017 17:57:31 +0000 (11:57 -0600)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 1 Jun 2017 07:30:08 +0000 (00:30 -0700)
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 <atish.patra@oracle.com>
Reviewed-by: Rob Gardner <rob.gardner@oracle.com>
Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com>
Reviewed-by: Dave Kleikamp <dave.kleikamp@oracle.com>
(cherry picked from commit 0f6bfff7803dacb7ebfd765d6a2beb54e018698a)

Conflicts:

drivers/char/ipmi/ipmi_si_intf.c

drivers/char/ipmi/ipmi_si_intf.c

index ce0ca691512e5f23cd0b8d273591dd0db46f24d7..58cdd6612000486c58fb2c34befa64d78527909c 100644 (file)
@@ -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;
        }