From: Cosmo Chou <chou.cosmo@gmail.com>
To: minyard@acm.org, quan@os.amperecomputing.com
Cc: openipmi-developer@lists.sourceforge.net,
linux-kernel@vger.kernel.org, chou.cosmo@gmail.com,
cosmo.chou@quantatw.com, potin.lai@quantatw.com
Subject: [PATCH] ipmi: ssif_bmc: Move smbus_cmd assignment after cleanup
Date: Thu, 2 Jan 2025 00:54:31 +0800 [thread overview]
Message-ID: <20250101165431.2113407-1-chou.cosmo@gmail.com> (raw)
Move smbus_cmd assignment to the end of process_smbus_cmd() to ensure
the new command is not lost when complete_response() is triggered.
Fixes: dd2bc5cc9e25 ("ipmi: ssif_bmc: Add SSIF BMC driver")
Signed-off-by: Cosmo Chou <chou.cosmo@gmail.com>
---
drivers/char/ipmi/ssif_bmc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/char/ipmi/ssif_bmc.c b/drivers/char/ipmi/ssif_bmc.c
index a14fafc583d4..7a4f52987a7d 100644
--- a/drivers/char/ipmi/ssif_bmc.c
+++ b/drivers/char/ipmi/ssif_bmc.c
@@ -579,7 +579,6 @@ static void process_request_part(struct ssif_bmc_ctx *ssif_bmc)
static void process_smbus_cmd(struct ssif_bmc_ctx *ssif_bmc, u8 *val)
{
/* SMBUS command can vary (single or multi-part) */
- ssif_bmc->part_buf.smbus_cmd = *val;
ssif_bmc->msg_idx = 1;
memset(&ssif_bmc->part_buf.payload[0], 0, MAX_PAYLOAD_PER_TRANSACTION);
@@ -596,6 +595,7 @@ static void process_smbus_cmd(struct ssif_bmc_ctx *ssif_bmc, u8 *val)
if (ssif_bmc->aborting)
ssif_bmc->aborting = false;
}
+ ssif_bmc->part_buf.smbus_cmd = *val;
}
static void on_read_requested_event(struct ssif_bmc_ctx *ssif_bmc, u8 *val)
--
2.34.1
next reply other threads:[~2025-01-01 16:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-01 16:54 Cosmo Chou [this message]
2025-01-03 3:20 ` [PATCH] ipmi: ssif_bmc: Move smbus_cmd assignment after cleanup Corey Minyard
2025-01-03 3:49 ` Quan Nguyen
2025-01-03 3:44 ` Quan Nguyen
2025-01-03 13:01 ` Corey Minyard
2025-01-06 2:32 ` Quan Nguyen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250101165431.2113407-1-chou.cosmo@gmail.com \
--to=chou.cosmo@gmail.com \
--cc=cosmo.chou@quantatw.com \
--cc=linux-kernel@vger.kernel.org \
--cc=minyard@acm.org \
--cc=openipmi-developer@lists.sourceforge.net \
--cc=potin.lai@quantatw.com \
--cc=quan@os.amperecomputing.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox