Skip to content

Commit

Permalink
Merge tag 'for-linus-4.18' of git://github.com/cminyard/linux-ipmi
Browse files Browse the repository at this point in the history
Pull IPMI updates from Corey Minyard:
 "It's been a busy release for the IPMI driver. Some notable changes:

   - A user was running into timeout issues doing maintenance commands
     over the IPMB network behind an IPMI controller.

     Extend the maintenance mode concept to messages over IPMB and allow
     the timeouts to be tuned.

   - Lots of cleanup, style fixing, some bugfixes, and such.

   - At least one user was having trouble with the way the IPMI driver
     would lock the i2c driver module it used.

     The IPMI driver was not designed for hotplug. However, hotplug is a
     reality now, so the IPMI driver was modified to support hotplug.

   - The proc interface code is now completely removed. Long live sysfs!"

* tag 'for-linus-4.18' of git://github.com/cminyard/linux-ipmi: (35 commits)
  ipmi: Properly release srcu locks on error conditions
  ipmi: NPCM7xx KCS BMC: enable interrupt to the host
  ipmi:bt: Set the timeout before doing a capabilities check
  ipmi: Remove the proc interface
  ipmi_ssif: Fix uninitialized variable issue
  ipmi: add an NPCM7xx KCS BMC driver
  ipmi_si: Clean up shutdown a bit
  ipmi_si: Rename intf_num to si_num
  ipmi: Remove smi->intf checks
  ipmi_ssif: Get rid of unused intf_num
  ipmi: Get rid of ipmi_user_t and ipmi_smi_t in include files
  ipmi: ipmi_unregister_smi() cannot fail, have it return void
  ipmi_devintf: Add an error return on invalid ioctls
  ipmi: Remove usecount function from interfaces
  ipmi_ssif: Remove usecount handling
  ipmi: Remove condition on interface shutdown
  ipmi_ssif: Convert over to a shutdown handler
  ipmi_si: Convert over to a shutdown handler
  ipmi: Rework locking and shutdown for hot remove
  ipmi: Fix some counter issues
  ...
  • Loading branch information
torvalds committed Jun 6, 2018
2 parents 8450493 + 048f7c3 commit 0eb0061
Show file tree
Hide file tree
Showing 13 changed files with 1,752 additions and 1,883 deletions.
39 changes: 39 additions & 0 deletions Documentation/devicetree/bindings/ipmi/npcm7xx-kcs-bmc.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
* Nuvoton NPCM7xx KCS (Keyboard Controller Style) IPMI interface

The Nuvoton SOCs (NPCM7xx) 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
"nuvoton,npcm750-kcs-bmc"
- interrupts : interrupt generated by the controller
- kcs_chan : The KCS channel number in the controller

Example:

lpc_kcs: lpc_kcs@f0007000 {
compatible = "nuvoton,npcm750-lpc-kcs", "simple-mfd", "syscon";
reg = <0xf0007000 0x40>;
reg-io-width = <1>;

#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0xf0007000 0x40>;

kcs1: kcs1@0 {
compatible = "nuvoton,npcm750-kcs-bmc";
reg = <0x0 0x40>;
interrupts = <0 9 4>;
kcs_chan = <1>;
status = "disabled";
};

kcs2: kcs2@0 {
compatible = "nuvoton,npcm750-kcs-bmc";
reg = <0x0 0x40>;
interrupts = <0 9 4>;
kcs_chan = <2>;
status = "disabled";
};
};
23 changes: 15 additions & 8 deletions drivers/char/ipmi/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,6 @@ config IPMI_DMI_DECODE

if IPMI_HANDLER

config IPMI_PROC_INTERFACE
bool 'Provide an interface for IPMI stats in /proc (deprecated)'
depends on PROC_FS
default y
help
Do not use this any more, use sysfs for this info. It will be
removed in future kernel versions.

config IPMI_PANIC_EVENT
bool 'Generate a panic event to all BMCs on a panic'
help
Expand Down Expand Up @@ -111,6 +103,21 @@ config ASPEED_KCS_IPMI_BMC
The driver implements the BMC side of the KCS contorller, it
provides the access of KCS IO space for BMC side.

config NPCM7XX_KCS_IPMI_BMC
depends on ARCH_NPCM7XX || COMPILE_TEST
select IPMI_KCS_BMC
select REGMAP_MMIO
tristate "NPCM7xx KCS IPMI BMC driver"
help
Provides a driver for the KCS (Keyboard Controller Style) IPMI
interface found on Nuvoton NPCM7xx SOCs.

The driver implements the BMC side of the KCS contorller, it
provides the access of KCS IO space for BMC side.

This support is also available as a module. If so, the module
will be called kcs_bmc_npcm7xx.

config ASPEED_BT_IPMI_BMC
depends on ARCH_ASPEED || COMPILE_TEST
depends on REGMAP && REGMAP_MMIO && MFD_SYSCON
Expand Down
1 change: 1 addition & 0 deletions drivers/char/ipmi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ 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
obj-$(CONFIG_NPCM7XX_KCS_IPMI_BMC) += kcs_bmc_npcm7xx.o
3 changes: 2 additions & 1 deletion drivers/char/ipmi/ipmi_bt_sm.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,11 +504,12 @@ static enum si_sm_result bt_event(struct si_sm_data *bt, long time)
if (status & BT_H_BUSY) /* clear a leftover H_BUSY */
BT_CONTROL(BT_H_BUSY);

bt->timeout = bt->BT_CAP_req2rsp;

/* Read BT capabilities if it hasn't been done yet */
if (!bt->BT_CAP_outreqs)
BT_STATE_CHANGE(BT_STATE_CAPABILITIES_BEGIN,
SI_SM_CALL_WITHOUT_DELAY);
bt->timeout = bt->BT_CAP_req2rsp;
BT_SI_SM_RETURN(SI_SM_IDLE);

case BT_STATE_XACTION_START:
Expand Down
Loading

0 comments on commit 0eb0061

Please sign in to comment.