Commit cc5ada7c authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'for-linus-4.17' of git://github.com/cminyard/linux-ipmi

Pull IPMI updates from Corey Minyard:
 "Mostly small changes, as usual.

  This does add an IPMI BMC server-side driver, to allow a Linux system
  to act as an IPMI controller. That's the biggest change, but it is
  just a new driver that is fairly narrow in use.

  The other largish change is removing ACPI SPMI probe support, which
  should have never really been there in the beginning"

* tag 'for-linus-4.17' of git://github.com/cminyard/linux-ipmi:
  ipmi/parisc: Add IPMI chassis poweroff for certain HP PA-RISC and IA-64 servers
  ipmi_ssif: Fix kernel panic at msg_done_handler
  ipmi:pci: Blacklist a Realtek "IPMI" device
  ipmi: Remove ACPI SPMI probing from the system interface driver
  ipmi: Remove ACPI SPMI probing from the SSIF (I2C) driver
  ipmi: missing error code in try_smi_init()
  ipmi: use ARRAY_SIZE for poweroff_functions array sizing calculation
  ipmi: Consolidate cleanup code
  ipmi: Remove some unnecessary initializations
  ipmi: Fix some error cleanup issues
  ipmi: Add or fix SPDX-License-Identifier in all files
  ipmi: Re-use existing macros for built-in properties
  ipmi:pci: Make the PCI defines consistent with normal Linux ones
  ipmi: kcs_bmc: coding-style fixes and use new poll type
  char/ipmi: add documentation for sysfs interface
  ipmi: kcs_bmc: mark expected switch fall-through in kcs_bmc_handle_data
  ipmi: add an Aspeed KCS IPMI BMC driver
  ipmi: add a KCS IPMI BMC driver
parents 77624cd2 c6185e28
What: /sys/devices/platform/ipmi_bmc.*/firmware_revision
Date: Mar, 2006
KernelVersion: v2.6.17
Contact: openipmi-developer@lists.sourceforge.net
Description:
(RO) The major and minor revision of the firmware.
What: /sys/devices/platform/ipmi_bmc.*/aux_firmware_revision
Date: Mar, 2006
KernelVersion: v2.6.17
Contact: openipmi-developer@lists.sourceforge.net
Description:
(RO) Holds additional information about the firmware revision,
such as boot block or internal data structure version numbers.
The meanings of the numbers are specific to the vendor
identified by Manufacturer ID.
What: /sys/devices/platform/ipmi_bmc.*/revision
Date: Mar, 2006
KernelVersion: v2.6.17
Contact: openipmi-developer@lists.sourceforge.net
Description:
(RO) Device revision. Useful for identifying if significant
hardware changes have been made to the implementation of the
management controller.
What: /sys/devices/platform/ipmi_bmc.*/provides_device_sdrs
Date: Mar, 2006
KernelVersion: v2.6.17
Contact: openipmi-developer@lists.sourceforge.net
Description:
(RO) Indicates whether device provides device sensor data
records (1) or not (0).
What: /sys/devices/platform/ipmi_bmc.*/device_id
Date: Mar, 2006
KernelVersion: v2.6.17
Contact: openipmi-developer@lists.sourceforge.net
Description:
(RO) Device id is specified by the manufacturer identified by
the Manufacturer ID field. This field allows controller specific
software to identify the unique application command, OEM
fields, and functionality that are provided by the controller
What: /sys/devices/platform/ipmi_bmc.*/additional_device_support
Date: Mar, 2006
KernelVersion: v2.6.17
Contact: openipmi-developer@lists.sourceforge.net
Description:
(RO) Lists the IPMI ‘logical device’ commands and functions
that the controller supports that are in addition to the
mandatory IPM and Application commands.
What: /sys/devices/platform/ipmi_bmc.*/ipmi_version
Date: Mar, 2006
KernelVersion: v2.6.17
Contact: openipmi-developer@lists.sourceforge.net
Description:
(RO) Displays the IPMI Command Specification Version.
What: /sys/devices/platform/ipmi_bmc.*/manufacturer_id
Date: Mar, 2006
KernelVersion: v2.6.17
Contact: openipmi-developer@lists.sourceforge.net
Description:
(RO) Identifies the manufacturer responsible for the
specification of functionality of the vendor (OEM)-specific
commands, codes, and interfaces used in the controller.
What: /sys/devices/platform/ipmi_bmc.*/product_id
Date: Mar, 2006
KernelVersion: v2.6.17
Contact: openipmi-developer@lists.sourceforge.net
Description:
(RO) Displays a number that identifies a particular system,
module, add-in card, or board set. The number is specified
according to the manufacturer given by Manufacturer ID.
For detailed definitions of the above attributes, refer to section 20.1 'Get
Device ID Command' of the IPMI specification v2.0.
What: /sys/devices/platform/ipmi_bmc.*/guid
Date: Mar, 2006
KernelVersion: v2.6.17
Contact: openipmi-developer@lists.sourceforge.net
Description:
(RO) A GUID (Globally Unique ID), also referred to as a UUID
(Universally Unique Identifier), for the management controller,
as described in section 20.8 'Get Device GUID Command' of the
IPMI specification v2.0.
What: /sys/devices/platform/ipmi_si.*/type
Date: Sep, 2017
KernelVersion: v4.15
Contact: openipmi-developer@lists.sourceforge.net
Description:
(RO) The device interface for IPMI "kcs", "smic", "bt" or
"invalid"
What: /sys/devices/platform/ipmi_si.*/idles
What: /sys/devices/platform/ipmi_si.*/watchdog_pretimeouts
What: /sys/devices/platform/ipmi_si.*/complete_transactions
What: /sys/devices/platform/ipmi_si.*/events
What: /sys/devices/platform/ipmi_si.*/interrupts
What: /sys/devices/platform/ipmi_si.*/hosed_count
What: /sys/devices/platform/ipmi_si.*/long_timeouts
What: /sys/devices/platform/ipmi_si.*/flag_fetches
What: /sys/devices/platform/ipmi_si.*/attentions
What: /sys/devices/platform/ipmi_si.*/incoming_messages
What: /sys/devices/platform/ipmi_si.*/short_timeouts
Date: Sep, 2017
KernelVersion: v4.15
Contact: openipmi-developer@lists.sourceforge.net
Description:
idles: (RO) Number of times the interface was
idle while being polled.
watchdog_pretimeouts: (RO) Number of watchdog pretimeouts.
complete_transactions: (RO) Number of completed messages.
events: (RO) Number of IPMI events received from
the hardware.
interrupts: (RO) Number of interrupts the driver
handled.
hosed_count: (RO) Number of times the hardware didn't
follow the state machine.
long_timeouts: (RO) Number of times the driver
requested a timer while nothing was in
progress.
flag_fetches: (RO) Number of times the driver
requested flags from the hardware.
attentions: (RO) Number of time the driver got an
ATTN from the hardware.
incoming_messages: (RO) Number of asynchronous messages
received.
short_timeouts: (RO) Number of times the driver
requested a timer while an operation was
in progress.
What: /sys/devices/platform/ipmi_si.*/interrupts_enabled
Date: Sep, 2017
KernelVersion: v4.15
Contact: openipmi-developer@lists.sourceforge.net
Description:
(RO) Indicates whether interrupts are enabled or not. The driver
disables interrupts when it gets into a situation where it
cannot handle messages due to lack of memory. Once that
situation clears up, it will re-enable interrupts.
What: /sys/devices/platform/ipmi_si.*/params
Date: Sep, 2017
KernelVersion: v4.15
Contact: openipmi-developer@lists.sourceforge.net
Description:
[to be documented]
What: /sys/devices/platform/dmi-ipmi-ssif.*/type
Date: Sep, 2017
KernelVersion: v4.15
Contact: openipmi-developer@lists.sourceforge.net
Description:
(RO) Shows the IMPI device interface type - "ssif" here.
What: /sys/devices/platform/dmi-ipmi-ssif.*/hosed
What: /sys/devices/platform/dmi-ipmi-ssif.*/alerts
What: /sys/devices/platform/dmi-ipmi-ssif.*/sent_messages
What: /sys/devices/platform/dmi-ipmi-ssif.*/sent_messages_parts
What: /sys/devices/platform/dmi-ipmi-ssif.*/received_messages
What: /sys/devices/platform/dmi-ipmi-ssif.*/received_message_parts
What: /sys/devices/platform/dmi-ipmi-ssif.*/events
What: /sys/devices/platform/dmi-ipmi-ssif.*/watchdog_pretimeouts
What: /sys/devices/platform/dmi-ipmi-ssif.*/flag_fetches
What: /sys/devices/platform/dmi-ipmi-ssif.*/send_retries
What: /sys/devices/platform/dmi-ipmi-ssif.*/receive_retries
What: /sys/devices/platform/dmi-ipmi-ssif.*/send_errors
What: /sys/devices/platform/dmi-ipmi-ssif.*/receive_errors
Date: Sep, 2017
KernelVersion: v4.15
Contact: openipmi-developer@lists.sourceforge.net
Description:
hosed: (RO) Number of times the hardware didn't
follow the state machine.
alerts: (RO) Number of alerts received.
sent_messages: (RO) Number of total messages sent.
sent_message_parts: (RO) Number of message parts sent.
Messages may be broken into parts if
they are long.
receieved_messages: (RO) Number of message responses
received.
received_message_parts: (RO) Number of message fragments
received.
events: (RO) Number of received events.
watchdog_pretimeouts: (RO) Number of watchdog pretimeouts.
flag_fetches: (RO) Number of times a flag fetch was
requested.
send_retries: (RO) Number of time a message was
retried.
receive_retries: (RO) Number of times the receive of a
message was retried.
send_errors: (RO) Number of times the send of a
message failed.
receive_errors: (RO) Number of errors in receiving
messages.
* Aspeed KCS (Keyboard Controller Style) IPMI interface
The Aspeed SOCs (AST2400 and AST2500) are commonly used as BMCs
(Baseboard Management Controllers) and the KCS interface can be
used to perform in-band IPMI communication with their host.
Required properties:
- compatible : should be one of
"aspeed,ast2400-kcs-bmc"
"aspeed,ast2500-kcs-bmc"
- interrupts : interrupt generated by the controller
- kcs_chan : The LPC channel number in the controller
- kcs_addr : The host CPU IO map address
Example:
kcs3: kcs3@0 {
compatible = "aspeed,ast2500-kcs-bmc";
reg = <0x0 0x80>;
interrupts = <8>;
kcs_chan = <3>;
kcs_addr = <0xCA2>;
status = "okay";
};
......@@ -96,6 +96,21 @@ config IPMI_POWEROFF
endif # IPMI_HANDLER
config IPMI_KCS_BMC
tristate
config ASPEED_KCS_IPMI_BMC
depends on ARCH_ASPEED || COMPILE_TEST
select IPMI_KCS_BMC
select REGMAP_MMIO
tristate "Aspeed KCS IPMI BMC driver"
help
Provides a driver for the KCS (Keyboard Controller Style) IPMI
interface found on Aspeed SOCs (AST2400 and AST2500).
The driver implements the BMC side of the KCS contorller, it
provides the access of KCS IO space for BMC side.
config ASPEED_BT_IPMI_BMC
depends on ARCH_ASPEED || COMPILE_TEST
depends on REGMAP && REGMAP_MMIO && MFD_SYSCON
......
......@@ -21,4 +21,6 @@ obj-$(CONFIG_IPMI_SSIF) += ipmi_ssif.o
obj-$(CONFIG_IPMI_POWERNV) += ipmi_powernv.o
obj-$(CONFIG_IPMI_WATCHDOG) += ipmi_watchdog.o
obj-$(CONFIG_IPMI_POWEROFF) += ipmi_poweroff.o
obj-$(CONFIG_IPMI_KCS_BMC) += kcs_bmc.o
obj-$(CONFIG_ASPEED_BT_IPMI_BMC) += bt-bmc.o
obj-$(CONFIG_ASPEED_KCS_IPMI_BMC) += kcs_bmc_aspeed.o
// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (c) 2015-2016, IBM Corporation.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
#include <linux/atomic.h>
......
// SPDX-License-Identifier: GPL-2.0+
/*
* ipmi_bt_sm.c
*
......@@ -5,26 +6,7 @@
* of the driver architecture at http://sourceforge.net/projects/openipmi
*
* Author: Rocky Craig <first.last@hp.com>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 675 Mass Ave, Cambridge, MA 02139, USA. */
*/
#include <linux/kernel.h> /* For printk. */
#include <linux/string.h>
......
// SPDX-License-Identifier: GPL-2.0+
/*
* ipmi_devintf.c
*
......@@ -8,27 +9,6 @@
* source@mvista.com
*
* Copyright 2002 MontaVista Software Inc.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <linux/module.h>
......
// SPDX-License-Identifier: GPL-2.0
// SPDX-License-Identifier: GPL-2.0+
/*
* A hack to create a platform device from a DMI entry. This will
* allow autoloading of the IPMI drive based on SMBIOS entries.
......@@ -29,15 +29,6 @@ static struct ipmi_dmi_info *ipmi_dmi_infos;
static int ipmi_dmi_nr __initdata;
#define set_prop_entry(_p_, _name_, type, val) \
do { \
struct property_entry *_p = &_p_; \
_p->name = _name_; \
_p->length = sizeof(type); \
_p->is_string = false; \
_p->value.type##_data = val; \
} while(0)
static void __init dmi_add_platform_ipmi(unsigned long base_addr,
u32 flags,
u8 slave_addr,
......@@ -85,9 +76,10 @@ static void __init dmi_add_platform_ipmi(unsigned long base_addr,
}
if (si_type != SI_TYPE_INVALID)
set_prop_entry(p[pidx++], "ipmi-type", u8, si_type);
set_prop_entry(p[pidx++], "slave-addr", u8, slave_addr);
set_prop_entry(p[pidx++], "addr-source", u8, SI_SMBIOS);
p[pidx++] = PROPERTY_ENTRY_U8("ipmi-type", si_type);
p[pidx++] = PROPERTY_ENTRY_U8("slave-addr", slave_addr);
p[pidx++] = PROPERTY_ENTRY_U8("addr-source", SI_SMBIOS);
info = kmalloc(sizeof(*info), GFP_KERNEL);
if (!info) {
......@@ -112,7 +104,7 @@ static void __init dmi_add_platform_ipmi(unsigned long base_addr,
goto err;
if (type == IPMI_DMI_TYPE_SSIF) {
set_prop_entry(p[pidx++], "i2c-addr", u16, base_addr);
p[pidx++] = PROPERTY_ENTRY_U16("i2c-addr", base_addr);
goto add_properties;
}
......
/* SPDX-License-Identifier: GPL-2.0 */
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* DMI defines for use by IPMI
*/
......
// SPDX-License-Identifier: GPL-2.0+
/*
* ipmi_kcs_sm.c
*
......@@ -8,27 +9,6 @@
* source@mvista.com
*
* Copyright 2002 MontaVista Software Inc.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
......
// SPDX-License-Identifier: GPL-2.0+
/*
* ipmi_msghandler.c
*
......@@ -8,27 +9,6 @@
* source@mvista.com
*
* Copyright 2002 MontaVista Software Inc.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <linux/module.h>
......
// SPDX-License-Identifier: GPL-2.0+
/*
* PowerNV OPAL IPMI driver
*
* Copyright 2014 IBM Corp.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
* any later version.
*/
#define pr_fmt(fmt) "ipmi-powernv: " fmt
......
// SPDX-License-Identifier: GPL-2.0+
/*
* ipmi_poweroff.c
*
......@@ -9,27 +10,6 @@
* source@mvista.com
*
* Copyright 2002,2004 MontaVista Software Inc.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <linux/module.h>
#include <linux/moduleparam.h>
......@@ -456,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
*/
......@@ -533,14 +531,16 @@ 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",
.detect = ipmi_chassis_detect,
.poweroff_func = ipmi_poweroff_chassis },
};
#define NUM_PO_FUNCS (sizeof(poweroff_functions) \
/ sizeof(struct poweroff_function))
#define NUM_PO_FUNCS ARRAY_SIZE(poweroff_functions)
/* Called on a powerdown request. */
......
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* ipmi_si.h
*
......
// SPDX-License-Identifier: GPL-2.0+
#include <linux/moduleparam.h>
#include "ipmi_si.h"
......
// SPDX-License-Identifier: GPL-2.0+
/*
* ipmi_si_hotmod.c
*
......
// SPDX-License-Identifier: GPL-2.0+
/*
* ipmi_si.c
*
......@@ -10,27 +11,6 @@
*
* Copyright 2002 MontaVista Software Inc.
* Copyright 2006 IBM Corp., Christian Krafft <krafft@de.ibm.com>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND