Skip to content

Commit 16ad3ee

Browse files
akky16gregkh
authored andcommitted
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 <[email protected]> Signed-off-by: Akshay Gupta <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent bbb4013 commit 16ad3ee

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/misc/amd-sbi/rmi-core.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,10 @@ int rmi_mailbox_xfer(struct sbrmi_data *data,
320320
ret = regmap_read(data->regmap, SBRMI_OUTBNDMSG7, &ec);
321321
if (ret || ec)
322322
goto exit_clear_alert;
323+
324+
/* Clear the input value before updating the output data */
325+
msg->mb_in_out = 0;
326+
323327
/*
324328
* For a read operation, the initiator (BMC) reads the firmware
325329
* response Command Data Out[31:0] from SBRMI::OutBndMsg_inst[4:1]

0 commit comments

Comments
 (0)