Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
ipmi_poweroff.c File Reference
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/proc_fs.h>
#include <linux/string.h>
#include <linux/completion.h>
#include <linux/pm.h>
#include <linux/kdev_t.h>
#include <linux/ipmi.h>
#include <linux/ipmi_smi.h>

Go to the source code of this file.

Data Structures

struct  poweroff_function
 

Macros

#define PFX   "IPMI poweroff: "
 
#define IPMI_CHASSIS_POWER_DOWN   0 /* power down, the default. */
 
#define IPMI_CHASSIS_POWER_CYCLE   0x02 /* power cycle */
 
#define IPMI_NETFN_ATCA   0x2c
 
#define IPMI_ATCA_SET_POWER_CMD   0x11
 
#define IPMI_ATCA_GET_ADDR_INFO_CMD   0x01
 
#define IPMI_PICMG_ID   0
 
#define IPMI_NETFN_OEM   0x2e
 
#define IPMI_ATCA_PPS_GRACEFUL_RESTART   0x11
 
#define IPMI_ATCA_PPS_IANA   "\x00\x40\x0A"
 
#define IPMI_MOTOROLA_MANUFACTURER_ID   0x0000A1
 
#define IPMI_MOTOROLA_PPS_IPMC_PRODUCT_ID   0x0051
 
#define IPMI_NETFN_OEM_1   0xf8
 
#define OEM_GRP_CMD_SET_RESET_STATE   0x84
 
#define OEM_GRP_CMD_SET_POWER_STATE   0x82
 
#define IPMI_NETFN_OEM_8   0xf8
 
#define OEM_GRP_CMD_REQUEST_HOTSWAP_CTRL   0x80
 
#define OEM_GRP_CMD_GET_SLOT_GA   0xa3
 
#define IPMI_NETFN_SENSOR_EVT   0x10
 
#define IPMI_CMD_GET_EVENT_RECEIVER   0x01
 
#define IPMI_CPI1_PRODUCT_ID   0x000157
 
#define IPMI_CPI1_MANUFACTURER_ID   0x0108
 
#define DELL_IANA_MFR_ID   {0xA2, 0x02, 0x00}
 
#define IPMI_NETFN_CHASSIS_REQUEST   0
 
#define IPMI_CHASSIS_CONTROL_CMD   0x02
 
#define NUM_PO_FUNCS
 

Functions

 module_param_call (ifnum_to_use, set_param_ifnum, param_get_int,&ifnum_to_use, 0644)
 
 MODULE_PARM_DESC (ifnum_to_use,"The interface number to use for the watchdog ""timer. Setting to -1 defaults to the first registered ""interface")
 
 module_param (poweroff_powercycle, int, 0644)
 
 MODULE_PARM_DESC (poweroff_powercycle," Set to non-zero to enable power cycle instead of power"" down. Power cycle is contingent on hardware support,"" otherwise it defaults back to power down.")
 
 module_init (ipmi_poweroff_init)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_AUTHOR ("Corey Minyard <[email protected]>")
 
 MODULE_DESCRIPTION ("IPMI Poweroff extension to sys_reboot")
 

Macro Definition Documentation

#define DELL_IANA_MFR_ID   {0xA2, 0x02, 0x00}

Definition at line 446 of file ipmi_poweroff.c.

#define IPMI_ATCA_GET_ADDR_INFO_CMD   0x01

Definition at line 192 of file ipmi_poweroff.c.

#define IPMI_ATCA_PPS_GRACEFUL_RESTART   0x11

Definition at line 196 of file ipmi_poweroff.c.

#define IPMI_ATCA_PPS_IANA   "\x00\x40\x0A"

Definition at line 197 of file ipmi_poweroff.c.

#define IPMI_ATCA_SET_POWER_CMD   0x11

Definition at line 191 of file ipmi_poweroff.c.

#define IPMI_CHASSIS_CONTROL_CMD   0x02

Definition at line 464 of file ipmi_poweroff.c.

#define IPMI_CHASSIS_POWER_CYCLE   0x02 /* power cycle */

Definition at line 52 of file ipmi_poweroff.c.

#define IPMI_CHASSIS_POWER_DOWN   0 /* power down, the default. */

Definition at line 51 of file ipmi_poweroff.c.

#define IPMI_CMD_GET_EVENT_RECEIVER   0x01

Definition at line 327 of file ipmi_poweroff.c.

#define IPMI_CPI1_MANUFACTURER_ID   0x0108

Definition at line 330 of file ipmi_poweroff.c.

#define IPMI_CPI1_PRODUCT_ID   0x000157

Definition at line 329 of file ipmi_poweroff.c.

#define IPMI_MOTOROLA_MANUFACTURER_ID   0x0000A1

Definition at line 198 of file ipmi_poweroff.c.

#define IPMI_MOTOROLA_PPS_IPMC_PRODUCT_ID   0x0051

Definition at line 199 of file ipmi_poweroff.c.

#define IPMI_NETFN_ATCA   0x2c

Definition at line 190 of file ipmi_poweroff.c.

#define IPMI_NETFN_CHASSIS_REQUEST   0

Definition at line 463 of file ipmi_poweroff.c.

#define IPMI_NETFN_OEM   0x2e

Definition at line 195 of file ipmi_poweroff.c.

#define IPMI_NETFN_OEM_1   0xf8

Definition at line 320 of file ipmi_poweroff.c.

#define IPMI_NETFN_OEM_8   0xf8

Definition at line 323 of file ipmi_poweroff.c.

#define IPMI_NETFN_SENSOR_EVT   0x10

Definition at line 326 of file ipmi_poweroff.c.

#define IPMI_PICMG_ID   0

Definition at line 193 of file ipmi_poweroff.c.

#define NUM_PO_FUNCS
Value:
(sizeof(poweroff_functions) \
/ sizeof(struct poweroff_function))

Definition at line 542 of file ipmi_poweroff.c.

#define OEM_GRP_CMD_GET_SLOT_GA   0xa3

Definition at line 325 of file ipmi_poweroff.c.

#define OEM_GRP_CMD_REQUEST_HOTSWAP_CTRL   0x80

Definition at line 324 of file ipmi_poweroff.c.

#define OEM_GRP_CMD_SET_POWER_STATE   0x82

Definition at line 322 of file ipmi_poweroff.c.

#define OEM_GRP_CMD_SET_RESET_STATE   0x84

Definition at line 321 of file ipmi_poweroff.c.

#define PFX   "IPMI poweroff: "

Definition at line 44 of file ipmi_poweroff.c.

Function Documentation

MODULE_AUTHOR ( "Corey Minyard <[email protected]>"  )
MODULE_DESCRIPTION ( "IPMI Poweroff extension to sys_reboot )
module_init ( ipmi_poweroff_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( poweroff_powercycle  ,
int  ,
0644   
)
module_param_call ( ifnum_to_use  ,
set_param_ifnum  ,
param_get_int  ,
ifnum_to_use,
0644   
)
MODULE_PARM_DESC ( ifnum_to_use  ,
"The interface number to use for the watchdog ""timer. Setting to -1 defaults to the first registered ""interface  
)
MODULE_PARM_DESC ( poweroff_powercycle  ,
" Set to non-zero to enable power cycle instead of power"" down. Power cycle is contingent on hardware  support,
""otherwise it defaults back to power down."   
)