Skip to content

Commit 11030fe

Browse files
committed
Merge tag 'for-linus-5.9-1' of git://github.com/cminyard/linux-ipmi
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
2 parents 449dc8c + 634b06d commit 11030fe

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

Documentation/driver-api/ipmi.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,7 @@ at module load time (for a module) with::
516516
slave_addrs=<addr1>,<addr2>,...
517517
tryacpi=[0|1] trydmi=[0|1]
518518
[dbg_probe=1]
519+
alerts_broken
519520

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

541+
alerts_broken does not enable SMBus alert for SSIF. Otherwise SMBus
542+
alert will be enabled on supported hardware.
543+
540544
Discovering the IPMI compliant BMC on the SMBus can cause devices on
541545
the I2C bus to fail. The SMBus driver writes a "Get Device ID" IPMI
542546
message as a block write to the I2C bus and waits for a response.

drivers/char/ipmi/ipmi_msghandler.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3080,8 +3080,6 @@ static int __ipmi_bmc_register(struct ipmi_smi *intf,
30803080
rv = sysfs_create_link(&bmc->pdev.dev.kobj, &intf->si_dev->kobj,
30813081
intf->my_dev_name);
30823082
if (rv) {
3083-
kfree(intf->my_dev_name);
3084-
intf->my_dev_name = NULL;
30853083
dev_err(intf->si_dev, "Unable to create symlink to bmc: %d\n",
30863084
rv);
30873085
goto out_free_my_dev_name;

drivers/char/ipmi/ipmi_ssif.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@
2222
* and drives the real SSIF state machine.
2323
*/
2424

25-
/*
26-
* TODO: Figure out how to use SMB alerts. This will require a new
27-
* interface into the I2C driver, I believe.
28-
*/
29-
3025
#define pr_fmt(fmt) "ipmi_ssif: " fmt
3126
#define dev_fmt(fmt) "ipmi_ssif: " fmt
3227

drivers/char/ipmi/ipmi_watchdog.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,12 +232,17 @@ static int set_param_str(const char *val, const struct kernel_param *kp)
232232
static int get_param_str(char *buffer, const struct kernel_param *kp)
233233
{
234234
action_fn fn = (action_fn) kp->arg;
235-
int rv;
235+
int rv, len;
236236

237237
rv = fn(NULL, buffer);
238238
if (rv)
239239
return rv;
240-
return strlen(buffer);
240+
241+
len = strlen(buffer);
242+
buffer[len++] = '\n';
243+
buffer[len] = 0;
244+
245+
return len;
241246
}
242247

243248

0 commit comments

Comments
 (0)