Skip to content

Commit

Permalink
Merge tag 'for-linus-5.9-1' of git://github.com/cminyard/linux-ipmi
Browse files Browse the repository at this point in the history
Pull IPMI updates from Corey Minyard:
 "Minor cleanups to the IPMI driver for 5.9

  Nothing of any major consequence. Duplicate code, some missing \n's in
  sysfs files, some documentation and comment changes"

* tag 'for-linus-5.9-1' of git://github.com/cminyard/linux-ipmi:
  ipmi/watchdog: add missing newlines when printing parameters by sysfs
  ipmi: remve duplicate code in __ipmi_bmc_register()
  ipmi: ssif: Remove finished TODO comment about SMBus alert
  Doc: driver-api: ipmi: Add description of alerts_broken module param
  • Loading branch information
Linus Torvalds committed Aug 8, 2020
2 parents 449dc8c + 634b06d commit 11030fe
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
4 changes: 4 additions & 0 deletions Documentation/driver-api/ipmi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,7 @@ at module load time (for a module) with::
slave_addrs=<addr1>,<addr2>,...
tryacpi=[0|1] trydmi=[0|1]
[dbg_probe=1]
alerts_broken

The addresses are normal I2C addresses. The adapter is the string
name of the adapter, as shown in /sys/class/i2c-adapter/i2c-<n>/name.
Expand All @@ -537,6 +538,9 @@ The slave_addrs specifies the IPMI address of the local BMC. This is
usually 0x20 and the driver defaults to that, but in case it's not, it
can be specified when the driver starts up.

alerts_broken does not enable SMBus alert for SSIF. Otherwise SMBus
alert will be enabled on supported hardware.

Discovering the IPMI compliant BMC on the SMBus can cause devices on
the I2C bus to fail. The SMBus driver writes a "Get Device ID" IPMI
message as a block write to the I2C bus and waits for a response.
Expand Down
2 changes: 0 additions & 2 deletions drivers/char/ipmi/ipmi_msghandler.c
Original file line number Diff line number Diff line change
Expand Up @@ -3080,8 +3080,6 @@ static int __ipmi_bmc_register(struct ipmi_smi *intf,
rv = sysfs_create_link(&bmc->pdev.dev.kobj, &intf->si_dev->kobj,
intf->my_dev_name);
if (rv) {
kfree(intf->my_dev_name);
intf->my_dev_name = NULL;
dev_err(intf->si_dev, "Unable to create symlink to bmc: %d\n",
rv);
goto out_free_my_dev_name;
Expand Down
5 changes: 0 additions & 5 deletions drivers/char/ipmi/ipmi_ssif.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@
* and drives the real SSIF state machine.
*/

/*
* TODO: Figure out how to use SMB alerts. This will require a new
* interface into the I2C driver, I believe.
*/

#define pr_fmt(fmt) "ipmi_ssif: " fmt
#define dev_fmt(fmt) "ipmi_ssif: " fmt

Expand Down
9 changes: 7 additions & 2 deletions drivers/char/ipmi/ipmi_watchdog.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,12 +232,17 @@ static int set_param_str(const char *val, const struct kernel_param *kp)
static int get_param_str(char *buffer, const struct kernel_param *kp)
{
action_fn fn = (action_fn) kp->arg;
int rv;
int rv, len;

rv = fn(NULL, buffer);
if (rv)
return rv;
return strlen(buffer);

len = strlen(buffer);
buffer[len++] = '\n';
buffer[len] = 0;

return len;
}


Expand Down

0 comments on commit 11030fe

Please sign in to comment.