[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250716110729.2193725-3-akshay.gupta@amd.com>
Date: Wed, 16 Jul 2025 11:07:29 +0000
From: Akshay Gupta <akshay.gupta@....com>
To: <linux-kernel@...r.kernel.org>
CC: <gregkh@...uxfoundation.org>, <arnd@...db.de>, <Anand.Umarji@....com>,
Akshay Gupta <akshay.gupta@....com>, Naveen Krishna Chatradhi
<naveenkrishna.chatradhi@....com>
Subject: [PATCH v5 3/3] misc: amd-sbi: Explicitly clear in/out arg "mb_in_out"
- New AMD processor will support different input/output for same command.
- In some scenarios the input value is not cleared, which will be added to
output before reporting the data.
- Clearing input explicitly will be a cleaner and safer approach.
Reviewed-by: Naveen Krishna Chatradhi <naveenkrishna.chatradhi@....com>
Signed-off-by: Akshay Gupta <akshay.gupta@....com>
---
New patch
drivers/misc/amd-sbi/rmi-core.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/misc/amd-sbi/rmi-core.c b/drivers/misc/amd-sbi/rmi-core.c
index 9048517c088c..3dec2fc00124 100644
--- a/drivers/misc/amd-sbi/rmi-core.c
+++ b/drivers/misc/amd-sbi/rmi-core.c
@@ -320,6 +320,10 @@ int rmi_mailbox_xfer(struct sbrmi_data *data,
ret = regmap_read(data->regmap, SBRMI_OUTBNDMSG7, &ec);
if (ret || ec)
goto exit_clear_alert;
+
+ /* Clear the input value before updating the output data */
+ msg->mb_in_out = 0;
+
/*
* For a read operation, the initiator (BMC) reads the firmware
* response Command Data Out[31:0] from SBRMI::OutBndMsg_inst[4:1]
--
2.25.1
Powered by blists - more mailing lists