Linux Kernel
3.7.1
|
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/sched.h>
#include <linux/seq_file.h>
#include <linux/timer.h>
#include <linux/errno.h>
#include <linux/spinlock.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/list.h>
#include <linux/pci.h>
#include <linux/ioport.h>
#include <linux/notifier.h>
#include <linux/mutex.h>
#include <linux/kthread.h>
#include <asm/irq.h>
#include <linux/interrupt.h>
#include <linux/rcupdate.h>
#include <linux/ipmi.h>
#include <linux/ipmi_smi.h>
#include <asm/io.h>
#include "ipmi_si_sm.h"
#include <linux/init.h>
#include <linux/dmi.h>
#include <linux/string.h>
#include <linux/ctype.h>
#include <linux/pnp.h>
#include <linux/of_device.h>
#include <linux/of_platform.h>
#include <linux/of_address.h>
#include <linux/of_irq.h>
Go to the source code of this file.
Data Structures | |
struct | smi_info |
struct | hotmod_vals |
struct | ipmi_default_vals |
Functions | |
module_param_call (hotmod, hotmod_handler, NULL, NULL, 0200) | |
MODULE_PARM_DESC (hotmod,"Add and remove interfaces. See"" Documentation/IPMI.txt in the kernel sources for the"" gory details.") | |
module_param_named (trydefaults, si_trydefaults, bool, 0) | |
MODULE_PARM_DESC (trydefaults,"Setting this to 'false' will disable the"" default scan of the KCS and SMIC interface at the standard"" address") | |
module_param_string (type, si_type_str, MAX_SI_TYPE_STR, 0) | |
MODULE_PARM_DESC (type,"Defines the type of each interface, each"" interface separated by commas. The types are 'kcs',"" 'smic', and 'bt'. For example si_type=kcs,bt will set"" the first interface to kcs and the second to bt") | |
module_param_array (addrs, ulong,&num_addrs, 0) | |
MODULE_PARM_DESC (addrs,"Sets the memory address of each interface, the"" addresses separated by commas. Only use if an interface"" is in memory. Otherwise, set it to zero or leave"" it blank.") | |
module_param_array (ports, uint,&num_ports, 0) | |
MODULE_PARM_DESC (ports,"Sets the port address of each interface, the"" addresses separated by commas. Only use if an interface"" is a port. Otherwise, set it to zero or leave"" it blank.") | |
module_param_array (irqs, int,&num_irqs, 0) | |
MODULE_PARM_DESC (irqs,"Sets the interrupt of each interface, the"" addresses separated by commas. Only use if an interface"" has an interrupt. Otherwise, set it to zero or leave"" it blank.") | |
module_param_array (regspacings, int,&num_regspacings, 0) | |
MODULE_PARM_DESC (regspacings,"The number of bytes between the start address"" and each successive register used by the interface. For"" instance, if the start address is 0xca2 and the spacing"" is 2, then the second address is at 0xca4. Defaults"" to 1.") | |
module_param_array (regsizes, int,&num_regsizes, 0) | |
MODULE_PARM_DESC (regsizes,"The size of the specific IPMI register in bytes."" This should generally be 1, 2, 4, or 8 for an 8-bit,"" 16-bit, 32-bit, or 64-bit register. Use this if you"" the 8-bit IPMI register has to be read from a larger"" register.") | |
module_param_array (regshifts, int,&num_regshifts, 0) | |
MODULE_PARM_DESC (regshifts,"The amount to shift the data read from the."" IPMI register, in bits. For instance, if the data"" is read from a 32-bit word and the IPMI data is in"" bit 8-15, then the shift would be 8") | |
module_param_array (slave_addrs, int,&num_slave_addrs, 0) | |
MODULE_PARM_DESC (slave_addrs,"Set the default IPMB slave address for"" the controller. Normally this is 0x20, but can be"" overridden by this parm. This is an array indexed"" by interface number.") | |
module_param_array (force_kipmid, int,&num_force_kipmid, 0) | |
MODULE_PARM_DESC (force_kipmid,"Force the kipmi daemon to be enabled (1) or"" disabled(0). Normally the IPMI driver auto-detects"" this, but the value may be overridden by this parm.") | |
module_param (unload_when_empty, int, 0) | |
MODULE_PARM_DESC (unload_when_empty,"Unload the module if no interfaces are"" specified or found, default is 1. Setting to 0"" is useful for hot add of devices using hotmod.") | |
module_param_array (kipmid_max_busy_us, uint,&num_max_busy_us, 0644) | |
MODULE_PARM_DESC (kipmid_max_busy_us,"Max time (in microseconds) to busy-wait for IPMI data before"" sleeping. 0 (default) means to wait forever. Set to 100-500"" if kipmid is using up a lot of CPU time.") | |
module_init (init_ipmi_si) | |
module_exit (cleanup_ipmi_si) | |
MODULE_LICENSE ("GPL") | |
MODULE_AUTHOR ("Corey Minyard <[email protected]>") | |
MODULE_DESCRIPTION ("Interface to the IPMI driver for the KCS, SMIC, and BT"" system interfaces.") | |
#define CANNOT_RETURN_REQUESTED_LENGTH 0xCA |
Definition at line 2954 of file ipmi_si_intf.c.
#define DEFAULT_REGSIZE 1 |
Definition at line 1208 of file ipmi_si_intf.c.
#define DEFAULT_REGSPACING 1 |
Definition at line 1207 of file ipmi_si_intf.c.
#define DELL_IANA_MFR_ID 0x0002a2 |
Definition at line 2935 of file ipmi_si_intf.c.
#define DELL_POWEREDGE_8G_BMC_DEVICE_ID 0x20 |
Definition at line 2932 of file ipmi_si_intf.c.
#define DELL_POWEREDGE_8G_BMC_DEVICE_REV 0x80 |
Definition at line 2933 of file ipmi_si_intf.c.
#define DELL_POWEREDGE_8G_BMC_IPMI_VERSION 0x51 |
Definition at line 2934 of file ipmi_si_intf.c.
#define DEVICE_NAME "ipmi_si" |
Definition at line 113 of file ipmi_si_intf.c.
#define EVENT_MSG_BUFFER_FULL 0x02 |
Definition at line 204 of file ipmi_si_intf.c.
#define IPMI_BT_INTMASK_CLEAR_IRQ_BIT 2 |
Definition at line 101 of file ipmi_si_intf.c.
#define IPMI_BT_INTMASK_ENABLE_IRQ_BIT 1 |
Definition at line 102 of file ipmi_si_intf.c.
#define IPMI_BT_INTMASK_REG 2 |
Definition at line 100 of file ipmi_si_intf.c.
#define IPMI_IO_ADDR_SPACE 0 |
Definition at line 1229 of file ipmi_si_intf.c.
#define IPMI_MEM_ADDR_SPACE 1 |
Definition at line 1230 of file ipmi_si_intf.c.
#define MAX_SI_TYPE_STR 30 |
Definition at line 1212 of file ipmi_si_intf.c.
#define OEM0_DATA_AVAIL 0x20 |
Definition at line 206 of file ipmi_si_intf.c.
#define OEM1_DATA_AVAIL 0x40 |
Definition at line 207 of file ipmi_si_intf.c.
#define OEM2_DATA_AVAIL 0x80 |
Definition at line 208 of file ipmi_si_intf.c.
#define OEM_DATA_AVAIL |
Definition at line 209 of file ipmi_si_intf.c.
#define PFX "ipmi_si: " |
Definition at line 74 of file ipmi_si_intf.c.
#define RECEIVE_MSG_AVAIL 0x01 |
Definition at line 203 of file ipmi_si_intf.c.
#define SI_MAX_PARMS 4 |
Definition at line 290 of file ipmi_si_intf.c.
#define SI_SHORT_TIMEOUT_USEC |
Definition at line 83 of file ipmi_si_intf.c.
#define SI_TIMEOUT_JIFFIES (SI_TIMEOUT_TIME_USEC/SI_USEC_PER_JIFFY) |
Definition at line 82 of file ipmi_si_intf.c.
#define SI_TIMEOUT_TIME_USEC 10000 |
Definition at line 80 of file ipmi_si_intf.c.
#define SI_USEC_PER_JIFFY (1000000/HZ) |
Definition at line 81 of file ipmi_si_intf.c.
#define smi_get_stat | ( | smi, | |
stat | |||
) | ((unsigned int) atomic_read(&(smi)->stats[SI_STAT_ ## stat])) |
Definition at line 287 of file ipmi_si_intf.c.
#define smi_inc_stat | ( | smi, | |
stat | |||
) | atomic_inc(&(smi)->stats[SI_STAT_ ## stat]) |
Definition at line 285 of file ipmi_si_intf.c.
#define STORAGE_CMD_GET_SDR 0x23 |
Definition at line 2980 of file ipmi_si_intf.c.
#define STORAGE_NETFN 0x0A |
Definition at line 2979 of file ipmi_si_intf.c.
#define WDT_PRE_TIMEOUT_INT 0x08 |
Definition at line 205 of file ipmi_si_intf.c.
enum hotmod_op |
Definition at line 1589 of file ipmi_si_intf.c.
enum si_intf_state |
Definition at line 85 of file ipmi_si_intf.c.
enum si_stat_indexes |
Definition at line 120 of file ipmi_si_intf.c.
enum si_type |
Definition at line 104 of file ipmi_si_intf.c.
MODULE_AUTHOR | ( | "Corey Minyard <[email protected]>" | ) |
MODULE_DESCRIPTION | ( | "Interface to the IPMI driver for the | KCS, |
SMIC | , | ||
and BT""system interfaces." | |||
) |
module_exit | ( | cleanup_ipmi_si | ) |
module_init | ( | init_ipmi_si | ) |
MODULE_LICENSE | ( | "GPL" | ) |
module_param | ( | unload_when_empty | , |
int | , | ||
0 | |||
) |
module_param_array | ( | addrs | , |
ulong | , | ||
& | num_addrs, | ||
0 | |||
) |
module_param_array | ( | irqs | , |
int | , | ||
& | num_irqs, | ||
0 | |||
) |
module_param_array | ( | regspacings | , |
int | , | ||
& | num_regspacings, | ||
0 | |||
) |
module_param_array | ( | regsizes | , |
int | , | ||
& | num_regsizes, | ||
0 | |||
) |
module_param_array | ( | regshifts | , |
int | , | ||
& | num_regshifts, | ||
0 | |||
) |
module_param_array | ( | slave_addrs | , |
int | , | ||
& | num_slave_addrs, | ||
0 | |||
) |
module_param_array | ( | force_kipmid | , |
int | , | ||
& | num_force_kipmid, | ||
0 | |||
) |
module_param_array | ( | kipmid_max_busy_us | , |
uint | , | ||
& | num_max_busy_us, | ||
0644 | |||
) |
module_param_named | ( | trydefaults | , |
si_trydefaults | , | ||
bool | , | ||
0 | |||
) |
module_param_string | ( | type | , |
si_type_str | , | ||
MAX_SI_TYPE_STR | , | ||
0 | |||
) |
MODULE_PARM_DESC | ( | hotmod | , |
"Add and remove interfaces. See"" Documentation/IPMI.txt in the kernel sources for the"" gory details." | |||
) |
MODULE_PARM_DESC | ( | trydefaults | , |
"Setting this to 'false' will disable the"" default scan of the KCS and SMIC interface at the standard"" address" | |||
) |
MODULE_PARM_DESC | ( | type | , |
"Defines the type of each | interface, | ||
each""interface separated by commas.The types are 'kcs' | , | ||
"" 'smic' | , | ||
and 'bt'.For example | si_type = kcs , |
||
bt will set""the first interface to kcs and the second to bt" | |||
) |
MODULE_PARM_DESC | ( | addrs | , |
"Sets the memory address of each | interface, | ||
the""addresses separated by commas.Only use if an interface""is in memory. | Otherwise, | ||
set it to zero or leave""it blank." | |||
) |
MODULE_PARM_DESC | ( | ports | , |
"Sets the port address of each | interface, | ||
the""addresses separated by commas.Only use if an interface""is a port. | Otherwise, | ||
set it to zero or leave""it blank." | |||
) |
MODULE_PARM_DESC | ( | irqs | , |
"Sets the interrupt of each | interface, | ||
the""addresses separated by commas.Only use if an interface""has an interrupt. | Otherwise, | ||
set it to zero or leave""it blank." | |||
) |
MODULE_PARM_DESC | ( | regspacings | , |
"The number of bytes between the start address"" and each successive register used by the interface. For"" | instance, | ||
if the start address is 0xca2 and the spacing""is | 2, | ||
then the second address is at 0xca4.Defaults""to 1." | |||
) |
MODULE_PARM_DESC | ( | regsizes | , |
"The size of the specific IPMI register in bytes."" This should generally be | 1, | ||
2 | , | ||
4 | , | ||
or 8 for an 8- | bit, | ||
""16- | bit, | ||
32- | bit, | ||
or 64-bit register.Use this if you""the 8-bit IPMI register has to be read from a larger""register." | |||
) |
MODULE_PARM_DESC | ( | regshifts | , |
"The amount to shift the data read from the."" IPMI | register, | ||
in bits.For | instance, | ||
if the data""is read from a 32-bit word and the IPMI data is in""bit 8- | 15, | ||
then the shift would be 8" | |||
) |
MODULE_PARM_DESC | ( | slave_addrs | , |
"Set the default IPMB slave address for"" the controller. Normally this is | 0x20, | ||
but can be""overridden by this parm.This is an array indexed""by interface number." | |||
) |
MODULE_PARM_DESC | ( | force_kipmid | , |
"Force the kipmi daemon to be enabled (1) or"" disabled(0). Normally the IPMI driver auto-detects"" | this, | ||
but the value may be overridden by this parm." | |||
) |
MODULE_PARM_DESC | ( | unload_when_empty | , |
"Unload the module if no interfaces are"" specified or | found, | ||
default is 1.Setting to 0""is useful for hot add of devices using hotmod." | |||
) |