From 10142a9b8ef26a31ae46265cc3b6cd1ee13ae866 Mon Sep 17 00:00:00 2001 From: Corey Minyard Date: Wed, 26 Mar 2003 23:30:10 -0800 Subject: [PATCH] [PATCH] fix ipmi_devintf.c compilation This fixes ipmi compilation (with some documentation updates and another minor fix, too). It also fixes a problem with the state machine getting stuck in a certain error condition. --- Documentation/IPMI.txt | 12 ++++++++++++ drivers/char/ipmi/Kconfig | 10 ++++++++-- drivers/char/ipmi/ipmi_devintf.c | 2 +- drivers/char/ipmi/ipmi_kcs_intf.c | 2 +- drivers/char/ipmi/ipmi_kcs_sm.c | 2 +- 5 files changed, 23 insertions(+), 5 deletions(-) diff --git a/Documentation/IPMI.txt b/Documentation/IPMI.txt index 47c2f4ba40ac4..825e83cb4acc5 100644 --- a/Documentation/IPMI.txt +++ b/Documentation/IPMI.txt @@ -5,6 +5,18 @@ +The Intelligent Platform Management Interface, or IPMI, is a +standard for controlling intelligent devices that monitor a system. +It provides for dynamic discovery of sensors in the system and the +ability to monitor the sensors and be informed when the sensor's +values change or go outside certain boundaries. It also has a +standardized database for field-replacable units (FRUs) and a watchdog +timer. + +To use this, you need an interface to an IPMI controller in your +system (called a Baseboard Management Controller, or BMC) and +management software that can use the IPMI system. + This document describes how to use the IPMI driver for Linux. If you are not familiar with IPMI itself, see the web site at http://www.intel.com/design/servers/ipmi/index.htm. IPMI is a big diff --git a/drivers/char/ipmi/Kconfig b/drivers/char/ipmi/Kconfig index 9b2c2f940a208..2698e45967200 100644 --- a/drivers/char/ipmi/Kconfig +++ b/drivers/char/ipmi/Kconfig @@ -7,8 +7,14 @@ config IPMI_HANDLER tristate 'IPMI top-level message handler' help This enables the central IPMI message handler, required for IPMI - to work. Note that you must have this enabled to do any other IPMI - things. See IPMI.txt for more details. + to work. + + IPMI is a standard for managing sensors (temperature, + voltage, etc.) in a system. + + See Documentation/IPMI.txt for more details on the driver. + + If unsure, say N. config IPMI_PANIC_EVENT bool 'Generate a panic event to all BMCs on a panic' diff --git a/drivers/char/ipmi/ipmi_devintf.c b/drivers/char/ipmi/ipmi_devintf.c index e511f95efbcde..4db232f8fbedb 100644 --- a/drivers/char/ipmi/ipmi_devintf.c +++ b/drivers/char/ipmi/ipmi_devintf.c @@ -449,7 +449,7 @@ static void ipmi_new_smi(int if_num) if (if_num > MAX_DEVICES) return; - snprinf(name, sizeof(name), "ipmidev/%d", if_num); + snprintf(name, sizeof(name), "ipmidev/%d", if_num); handles[if_num] = devfs_register(NULL, name, DEVFS_FL_NONE, ipmi_major, if_num, diff --git a/drivers/char/ipmi/ipmi_kcs_intf.c b/drivers/char/ipmi/ipmi_kcs_intf.c index f3109bf436770..ab162ed8aff03 100644 --- a/drivers/char/ipmi/ipmi_kcs_intf.c +++ b/drivers/char/ipmi/ipmi_kcs_intf.c @@ -826,7 +826,7 @@ static int init_one_kcs(int kcs_port, if (kcs_port && kcs_physaddr) return -EINVAL; - new_kcs = kmalloc(kcs_size(), GFP_KERNEL); + new_kcs = kmalloc(sizeof(*new_kcs), GFP_KERNEL); if (!new_kcs) { printk(KERN_ERR "ipmi_kcs: out of memory\n"); return -ENOMEM; diff --git a/drivers/char/ipmi/ipmi_kcs_sm.c b/drivers/char/ipmi/ipmi_kcs_sm.c index 5a96cd05ee251..5d796aa62a52e 100644 --- a/drivers/char/ipmi/ipmi_kcs_sm.c +++ b/drivers/char/ipmi/ipmi_kcs_sm.c @@ -468,7 +468,7 @@ enum kcs_result kcs_event(struct kcs_data *kcs, long time) break; case KCS_HOSED: - return KCS_SM_HOSED; + break; } if (kcs->state == KCS_HOSED) { -- 2.53.0