Skip to content

Commit c6185e2

Browse files
hdellercminyard
authored andcommitted
ipmi/parisc: Add IPMI chassis poweroff for certain HP PA-RISC and IA-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 <[email protected]> Signed-off-by: Corey Minyard <[email protected]>
1 parent f002612 commit c6185e2

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

drivers/char/ipmi/ipmi_poweroff.c

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,24 @@ static int ipmi_dell_chassis_detect(ipmi_user_t user)
436436
return 0;
437437
}
438438

439+
/*
440+
* ipmi_hp_chassis_detect()
441+
* HP PA-RISC servers rp3410/rp3440, the C8000 workstation and the rx2600 and
442+
* zx6000 machines support IPMI vers 1 and don't set the chassis capability bit
443+
* but they can handle a chassis poweroff or powercycle command.
444+
*/
445+
446+
#define HP_IANA_MFR_ID 0x0b
447+
#define HP_BMC_PROD_ID 0x8201
448+
static int ipmi_hp_chassis_detect(ipmi_user_t user)
449+
{
450+
if (mfg_id == HP_IANA_MFR_ID
451+
&& prod_id == HP_BMC_PROD_ID
452+
&& ipmi_version == 1)
453+
return 1;
454+
return 0;
455+
}
456+
439457
/*
440458
* Standard chassis support
441459
*/
@@ -513,6 +531,9 @@ static struct poweroff_function poweroff_functions[] = {
513531
{ .platform_type = "chassis",
514532
.detect = ipmi_dell_chassis_detect,
515533
.poweroff_func = ipmi_poweroff_chassis },
534+
{ .platform_type = "chassis",
535+
.detect = ipmi_hp_chassis_detect,
536+
.poweroff_func = ipmi_poweroff_chassis },
516537
/* Chassis should generally be last, other things should override
517538
it. */
518539
{ .platform_type = "chassis",

0 commit comments

Comments
 (0)