[PATCH] ipmi: ssif_bmc: Refrain warning printout when aborting request

Quan Nguyen quan at os.amperecomputing.com
Thu Nov 30 18:28:49 AEDT 2023


Ssif_bmc driver discards the current request if there is no response
provided until the new request comes, during that period, there are
multiple warning printed out as below:

"ipmi-ssif-host 0-0010: Warn: on_stop_event unexpected SLAVE STOP in state=SSIF_ABORTING
 ipmi-ssif-host 0-0010: Warn: on_stop_event unexpected SLAVE STOP in state=SSIF_ABORTING
 ipmi-ssif-host 0-0010: Warn: on_stop_event unexpected SLAVE STOP in state=SSIF_ABORTING
 ..."

This commit fixes the issue by refrain from printing that warning

Fixes: dd2bc5cc9e25 ("ipmi: ssif_bmc: Add SSIF BMC driver")
Signed-off-by: Quan Nguyen <quan at os.amperecomputing.com>
---
 drivers/char/ipmi/ssif_bmc.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/char/ipmi/ssif_bmc.c b/drivers/char/ipmi/ssif_bmc.c
index 56346fb32872..2857e7341d65 100644
--- a/drivers/char/ipmi/ssif_bmc.c
+++ b/drivers/char/ipmi/ssif_bmc.c
@@ -718,13 +718,15 @@ static void on_stop_event(struct ssif_bmc_ctx *ssif_bmc, u8 *val)
 {
 	if (ssif_bmc->state == SSIF_READY ||
 	    ssif_bmc->state == SSIF_START ||
-	    ssif_bmc->state == SSIF_SMBUS_CMD ||
-	    ssif_bmc->state == SSIF_ABORTING) {
+	    ssif_bmc->state == SSIF_SMBUS_CMD) {
 		dev_warn(&ssif_bmc->client->dev,
 			 "Warn: %s unexpected SLAVE STOP in state=%s\n",
 			 __func__, state_to_string(ssif_bmc->state));
 		ssif_bmc->state = SSIF_READY;
 
+	} else if (ssif_bmc->state == SSIF_ABORTING) {
+		ssif_bmc->state = SSIF_READY;
+
 	} else if (ssif_bmc->state == SSIF_REQ_RECVING) {
 		if (validate_request_part(ssif_bmc)) {
 			process_request_part(ssif_bmc);
-- 
2.35.1



More information about the openbmc mailing list