On 27.03.2018 15:16, Corey Minyard wrote: > On 03/24/2018 02:45 PM, Helge Deller wrote: >> 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. > > A few comments on this: > > That function is named ipmi_dell_chassis_detect(), just adding a HP > chassis to it doesn't seem like a good idea. There is already an array > of poweroff functions, please use that and create your own function. > You would have to restructure the dell function to make it clean, > and I don't want to do that. > > The CONFIG_PARISC clause probably doesn't matter. > > Please create defines for the magic numbers. My intention was to keep the patch small. Anyway, I'll respin a new patch with your suggestions. Thanks! Helge >> Signed-off-by: Helge Deller <deller@xxxxxx> >> >> diff --git a/drivers/char/ipmi/ipmi_poweroff.c b/drivers/char/ipmi/ipmi_poweroff.c >> index 38e6af1c8e38..09f34ea370da 100644 >> --- a/drivers/char/ipmi/ipmi_poweroff.c >> +++ b/drivers/char/ipmi/ipmi_poweroff.c >> @@ -453,6 +453,13 @@ static int ipmi_dell_chassis_detect(ipmi_user_t user) >> ipmi_version_major <= 1 && >> ipmi_version_minor < 5) >> return 1; >> + >> + /* BMC in HP C8000 can handle chassis functions too. */ >> + if (IS_ENABLED(CONFIG_PARISC) && >> + mfg_id == 0x0b && prod_id == 0x8201 && >> + ipmi_version == 1) >> + return 1; >> + >> return 0; >> } -- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html