mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[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>
This commit is contained in:
parent
b224cd3a0c
commit
c14979b993
3 changed files with 201 additions and 60 deletions
|
@ -298,13 +298,19 @@ void ipmi_get_version(ipmi_user_t user,
|
|||
this user, so it will affect all users of this interface. This is
|
||||
so some initialization code can come in and do the OEM-specific
|
||||
things it takes to determine your address (if not the BMC) and set
|
||||
it for everyone else. */
|
||||
void ipmi_set_my_address(ipmi_user_t user,
|
||||
unsigned char address);
|
||||
unsigned char ipmi_get_my_address(ipmi_user_t user);
|
||||
void ipmi_set_my_LUN(ipmi_user_t user,
|
||||
unsigned char LUN);
|
||||
unsigned char ipmi_get_my_LUN(ipmi_user_t user);
|
||||
it for everyone else. Note that each channel can have its own address. */
|
||||
int ipmi_set_my_address(ipmi_user_t user,
|
||||
unsigned int channel,
|
||||
unsigned char address);
|
||||
int ipmi_get_my_address(ipmi_user_t user,
|
||||
unsigned int channel,
|
||||
unsigned char *address);
|
||||
int ipmi_set_my_LUN(ipmi_user_t user,
|
||||
unsigned int channel,
|
||||
unsigned char LUN);
|
||||
int ipmi_get_my_LUN(ipmi_user_t user,
|
||||
unsigned int channel,
|
||||
unsigned char *LUN);
|
||||
|
||||
/*
|
||||
* Like ipmi_request, but lets you specify the number of retries and
|
||||
|
@ -585,6 +591,16 @@ struct ipmi_cmdspec
|
|||
* things it takes to determine your address (if not the BMC) and set
|
||||
* it for everyone else. You should probably leave the LUN alone.
|
||||
*/
|
||||
struct ipmi_channel_lun_address_set
|
||||
{
|
||||
unsigned short channel;
|
||||
unsigned char value;
|
||||
};
|
||||
#define IPMICTL_SET_MY_CHANNEL_ADDRESS_CMD _IOR(IPMI_IOC_MAGIC, 24, struct ipmi_channel_lun_address_set)
|
||||
#define IPMICTL_GET_MY_CHANNEL_ADDRESS_CMD _IOR(IPMI_IOC_MAGIC, 25, struct ipmi_channel_lun_address_set)
|
||||
#define IPMICTL_SET_MY_CHANNEL_LUN_CMD _IOR(IPMI_IOC_MAGIC, 26, struct ipmi_channel_lun_address_set)
|
||||
#define IPMICTL_GET_MY_CHANNEL_LUN_CMD _IOR(IPMI_IOC_MAGIC, 27, struct ipmi_channel_lun_address_set)
|
||||
/* Legacy interfaces, these only set IPMB 0. */
|
||||
#define IPMICTL_SET_MY_ADDRESS_CMD _IOR(IPMI_IOC_MAGIC, 17, unsigned int)
|
||||
#define IPMICTL_GET_MY_ADDRESS_CMD _IOR(IPMI_IOC_MAGIC, 18, unsigned int)
|
||||
#define IPMICTL_SET_MY_LUN_CMD _IOR(IPMI_IOC_MAGIC, 19, unsigned int)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue