Skip to content

Commit

Permalink
ipmi/parisc: Add IPMI chassis poweroff for certain HP PA-RISC and IA-…
Browse files Browse the repository at this point in the history
…64 servers

This patch allows HP PA-RISC servers like rp3410/rp3440 and the HP C8000
workstation with an IPMI controller that predate IPMI 1.5 to use the standard
poweroff or powercycle commands.

These systems firmware don't set the chassis capability bit in the Get
Device ID, but they do implement the standard poweroff and powercycle
commands.

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
  • Loading branch information
Helge Deller authored and Corey Minyard committed Mar 27, 2018
1 parent f002612 commit c6185e2
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions drivers/char/ipmi/ipmi_poweroff.c
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,24 @@ static int ipmi_dell_chassis_detect(ipmi_user_t user)
return 0;
}

/*
* ipmi_hp_chassis_detect()
* HP PA-RISC servers rp3410/rp3440, the C8000 workstation and the rx2600 and
* zx6000 machines support IPMI vers 1 and don't set the chassis capability bit
* but they can handle a chassis poweroff or powercycle command.
*/

#define HP_IANA_MFR_ID 0x0b
#define HP_BMC_PROD_ID 0x8201
static int ipmi_hp_chassis_detect(ipmi_user_t user)
{
if (mfg_id == HP_IANA_MFR_ID
&& prod_id == HP_BMC_PROD_ID
&& ipmi_version == 1)
return 1;
return 0;
}

/*
* Standard chassis support
*/
Expand Down Expand Up @@ -513,6 +531,9 @@ static struct poweroff_function poweroff_functions[] = {
{ .platform_type = "chassis",
.detect = ipmi_dell_chassis_detect,
.poweroff_func = ipmi_poweroff_chassis },
{ .platform_type = "chassis",
.detect = ipmi_hp_chassis_detect,
.poweroff_func = ipmi_poweroff_chassis },
/* Chassis should generally be last, other things should override
it. */
{ .platform_type = "chassis",
Expand Down

0 comments on commit c6185e2

Please sign in to comment.