Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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@amd.com>
Signed-off-by: Akshay Gupta <akshay.gupta@amd.com>
Link: https://lore.kernel.org/r/20250716110729.2193725-3-akshay.gupta@amd.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Akshay Gupta and committed by
Greg Kroah-Hartman
16ad3ee5 bbb40139

+4
+4
drivers/misc/amd-sbi/rmi-core.c
··· 320 320 ret = regmap_read(data->regmap, SBRMI_OUTBNDMSG7, &ec); 321 321 if (ret || ec) 322 322 goto exit_clear_alert; 323 + 324 + /* Clear the input value before updating the output data */ 325 + msg->mb_in_out = 0; 326 + 323 327 /* 324 328 * For a read operation, the initiator (BMC) reads the firmware 325 329 * response Command Data Out[31:0] from SBRMI::OutBndMsg_inst[4:1]