aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ipmi.h
diff options
context:
space:
mode:
authorCorey Minyard <minyard@acm.org>2005-09-06 18:18:38 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-07 19:57:47 -0400
commitc14979b993021377228958498937bcdd9539cbce (patch)
treee30638df99aa69f707e7549e4e990e9e92d477ae /include/linux/ipmi.h
parentb224cd3a0ca376dd52f382905c1aaf5a83a54692 (diff)
[PATCH] ipmi: add per-channel IPMB addresses
IPMI allows multiple IPMB channels on a single interface, and each channel might have a different IPMB address. However, the driver has only one IPMB address that it uses for everything. This patch adds new IOCTLS and a new internal interface for setting per-channel IPMB addresses and LUNs. New systems are coming out with support for multiple IPMB channels, and they are broken without this patch. Signed-off-by: Corey Minyard <minyard@acm.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/ipmi.h')
-rw-r--r--include/linux/ipmi.h30
1 files changed, 23 insertions, 7 deletions
diff --git a/include/linux/ipmi.h b/include/linux/ipmi.h
index 596ca6130159..846b69899776 100644
--- a/include/linux/ipmi.h
+++ b/include/linux/ipmi.h
@@ -298,13 +298,19 @@ void ipmi_get_version(ipmi_user_t user,
298 this user, so it will affect all users of this interface. This is 298 this user, so it will affect all users of this interface. This is
299 so some initialization code can come in and do the OEM-specific 299 so some initialization code can come in and do the OEM-specific
300 things it takes to determine your address (if not the BMC) and set 300 things it takes to determine your address (if not the BMC) and set
301 it for everyone else. */ 301 it for everyone else. Note that each channel can have its own address. */
302void ipmi_set_my_address(ipmi_user_t user, 302int ipmi_set_my_address(ipmi_user_t user,
303 unsigned char address); 303 unsigned int channel,
304unsigned char ipmi_get_my_address(ipmi_user_t user); 304 unsigned char address);
305void ipmi_set_my_LUN(ipmi_user_t user, 305int ipmi_get_my_address(ipmi_user_t user,
306 unsigned char LUN); 306 unsigned int channel,
307unsigned char ipmi_get_my_LUN(ipmi_user_t user); 307 unsigned char *address);
308int ipmi_set_my_LUN(ipmi_user_t user,
309 unsigned int channel,
310 unsigned char LUN);
311int ipmi_get_my_LUN(ipmi_user_t user,
312 unsigned int channel,
313 unsigned char *LUN);
308 314
309/* 315/*
310 * Like ipmi_request, but lets you specify the number of retries and 316 * Like ipmi_request, but lets you specify the number of retries and
@@ -585,6 +591,16 @@ struct ipmi_cmdspec
585 * things it takes to determine your address (if not the BMC) and set 591 * things it takes to determine your address (if not the BMC) and set
586 * it for everyone else. You should probably leave the LUN alone. 592 * it for everyone else. You should probably leave the LUN alone.
587 */ 593 */
594struct ipmi_channel_lun_address_set
595{
596 unsigned short channel;
597 unsigned char value;
598};
599#define IPMICTL_SET_MY_CHANNEL_ADDRESS_CMD _IOR(IPMI_IOC_MAGIC, 24, struct ipmi_channel_lun_address_set)
600#define IPMICTL_GET_MY_CHANNEL_ADDRESS_CMD _IOR(IPMI_IOC_MAGIC, 25, struct ipmi_channel_lun_address_set)
601#define IPMICTL_SET_MY_CHANNEL_LUN_CMD _IOR(IPMI_IOC_MAGIC, 26, struct ipmi_channel_lun_address_set)
602#define IPMICTL_GET_MY_CHANNEL_LUN_CMD _IOR(IPMI_IOC_MAGIC, 27, struct ipmi_channel_lun_address_set)
603/* Legacy interfaces, these only set IPMB 0. */
588#define IPMICTL_SET_MY_ADDRESS_CMD _IOR(IPMI_IOC_MAGIC, 17, unsigned int) 604#define IPMICTL_SET_MY_ADDRESS_CMD _IOR(IPMI_IOC_MAGIC, 17, unsigned int)
589#define IPMICTL_GET_MY_ADDRESS_CMD _IOR(IPMI_IOC_MAGIC, 18, unsigned int) 605#define IPMICTL_GET_MY_ADDRESS_CMD _IOR(IPMI_IOC_MAGIC, 18, unsigned int)
590#define IPMICTL_SET_MY_LUN_CMD _IOR(IPMI_IOC_MAGIC, 19, unsigned int) 606#define IPMICTL_SET_MY_LUN_CMD _IOR(IPMI_IOC_MAGIC, 19, unsigned int)