From: minyard@acm.org
To: openipmi-developer@lists.sourceforge.net
Cc: Andrew Manley <andrew.manley@sealingtech.com>,
linux-kernel@vger.kernel.org, Corey Minyard <cminyard@mvista.com>,
Corey Minyard <minyard@acm.org>
Subject: [PATCH 1/5] ipmi: Export ipmb_checksum()
Date: Mon, 4 Oct 2021 19:40:15 -0500 [thread overview]
Message-ID: <20211005004019.2670691-2-minyard@acm.org> (raw)
In-Reply-To: <20211005004019.2670691-1-minyard@acm.org>
From: Corey Minyard <cminyard@mvista.com>
It will be needed by the upcoming ipmb direct addressing.
Signed-off-by: Corey Minyard <minyard@acm.org>
Tested-by: Andrew Manley <andrew.manley@sealingtech.com>
Reviewed-by: Andrew Manley <andrew.manley@sealingtech.com>
---
drivers/char/ipmi/ipmi_msghandler.c | 3 ++-
include/linux/ipmi.h | 3 +++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
index 13988f88f1b0..ad1a8fc379b9 100644
--- a/drivers/char/ipmi/ipmi_msghandler.c
+++ b/drivers/char/ipmi/ipmi_msghandler.c
@@ -1710,7 +1710,7 @@ int ipmi_unregister_for_cmd(struct ipmi_user *user,
}
EXPORT_SYMBOL(ipmi_unregister_for_cmd);
-static unsigned char
+unsigned char
ipmb_checksum(unsigned char *data, int size)
{
unsigned char csum = 0;
@@ -1720,6 +1720,7 @@ ipmb_checksum(unsigned char *data, int size)
return -csum;
}
+EXPORT_SYMBOL(ipmb_checksum);
static inline void format_ipmb_msg(struct ipmi_smi_msg *smi_msg,
struct kernel_ipmi_msg *msg,
diff --git a/include/linux/ipmi.h b/include/linux/ipmi.h
index 52850a02a3d0..163831a087ef 100644
--- a/include/linux/ipmi.h
+++ b/include/linux/ipmi.h
@@ -335,4 +335,7 @@ extern int ipmi_get_smi_info(int if_num, struct ipmi_smi_info *data);
#define GET_DEVICE_ID_MAX_RETRY 5
+/* Helper function for computing the IPMB checksum of some data. */
+unsigned char ipmb_checksum(unsigned char *data, int size);
+
#endif /* __LINUX_IPMI_H */
--
2.25.1
next prev parent reply other threads:[~2021-10-05 0:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-05 0:40 [PATCH 0/5] Add support for access through an IPMB bus minyard
2021-10-05 0:40 ` minyard [this message]
2021-10-05 0:40 ` [PATCH 2/5] ipmi: Add support for IPMB direct messages minyard
2021-10-05 0:40 ` [PATCH 3/5] ipmi:ipmb: Add initial support for IPMI over IPMB minyard
2021-10-05 1:27 ` Randy Dunlap
2021-10-05 11:43 ` Corey Minyard
2021-10-05 0:40 ` [PATCH 4/5] ipmi: Add docs for IPMB direct addressing minyard
2021-10-05 0:40 ` [PATCH 5/5] ipmi: Add docs for the IPMI IPMB driver minyard
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=20211005004019.2670691-2-minyard@acm.org \
--to=minyard@acm.org \
--cc=andrew.manley@sealingtech.com \
--cc=cminyard@mvista.com \
--cc=linux-kernel@vger.kernel.org \
--cc=openipmi-developer@lists.sourceforge.net \
/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;
as well as URLs for NNTP newsgroup(s).