From: <Srinivas_G_Gowda@Dell.com>
To: <tcminyard@gmail.com>, <linux-kernel@vger.kernel.org>,
<openipmi@mvista.com>
Subject: [PATCH 0/1 v2 ] ipmi: Setting OS name as Linux in BMC
Date: Thu, 28 Jun 2012 22:14:30 +0530 [thread overview]
Message-ID: <4FEC89EE.60203@dell.com> (raw)
In-Reply-To: <4FEC88C2.3050309@dell.com>
>The idea here is fine, but it's probably more appropriate to do this in
>ipmi_msghandler.c, not ipmi_si_intf.c, since the latter only handles
>some interface types.
v2 patch - moving the code to ipmi_msghandler. Called soon after BMC is
registered by the driver.
There is an option in IPMI spec using which BMC can be made aware
of the OS name that it is talking to.
IPMI_Spec-IPMI2_0E4_061209 - ref - 22.14a , .Set System Info.
This patch will update the OS name as "Linux" in BMC during
IPMI Driver initialization. In the current patch declaration of
the OS name is done only for the Volatile param.
Signed-off-by: Srinivas Gowda G <Srinivas_G_Gowda@Dell.com>
---
drivers/char/ipmi/ipmi_msghandler.c | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
index 2c29942..d0abb3a 100644
--- a/drivers/char/ipmi/ipmi_msghandler.c
+++ b/drivers/char/ipmi/ipmi_msghandler.c
@@ -55,8 +55,10 @@ static struct ipmi_recv_msg *ipmi_alloc_recv_msg(void);
static int ipmi_init_msghandler(void);
static void smi_recv_tasklet(unsigned long);
static void handle_new_recv_msgs(ipmi_smi_t intf);
+static void set_os_name_bmc(ipmi_smi_t intf);
static int initialized;
+static unsigned char os_name_set;
#ifdef CONFIG_PROC_FS
static struct proc_dir_entry *proc_ipmi_root;
@@ -2568,6 +2570,11 @@ static int ipmi_bmc_register(ipmi_smi_t intf, int ifnum,
bmc->id.manufacturer_id,
bmc->id.product_id,
bmc->id.device_id);
+ /*
+ * Set the OS in BMC as "Linux" using
+ * "Set System Info" Command
+ */
+ set_os_name_bmc(intf);
}
/*
@@ -2702,6 +2709,27 @@ get_guid(ipmi_smi_t intf)
intf->null_user_handler = NULL;
}
+/*
+ * Set the Operating System Name as "Linux" in BMC
+ * using "Set System Info" command.
+ * Only setting Volatile variable - Parameter 4
+ */
+static void
+set_os_name_bmc(ipmi_smi_t intf)
+{
+ int rv;
+
+ intf->null_user_handler = set_os_name_handler;
+ rv = send_set_os_name_cmd(intf);
+ if (rv)
+ printk(KERN_WARNING PFX
+ "Send Failed: Set_System_Info - OS name Linux\n");
+
+ os_name_set = 0;
+ wait_event(intf->waitq, os_name_set == 1);
+ intf->null_user_handler = NULL;
+}
+
static int
send_channel_info_cmd(ipmi_smi_t intf, int chan)
{
--
1.7.1
Thanks,
G
parent reply other threads:[~2012-06-28 16:45 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <4FEC88C2.3050309@dell.com>]
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=4FEC89EE.60203@dell.com \
--to=srinivas_g_gowda@dell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=openipmi@mvista.com \
--cc=tcminyard@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.