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
/* 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;
}