ipmi: Setting OS name as Linux in BMC
A message that is not in the archive (sent off-list or not yet received): [email protected]
v2 cover ipmi: Setting OS name as Linux in BMC
Quoted 4 lines
The idea here is fine, but it's probably more appropriate to do this in
ipmi_msghandler.c, notipmi_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 <[email protected]>
--- drivers/char/ipmi/ipmi_msghandler.c | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 deletions(-)
drivers/char/ipmi/ipmi_msghandler.c +28 -0
@@ -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) {
Signature · 5 lines
1.7.1 Thanks, G