Skip to content

Commit 5198b44

Browse files
committed
Merge tag 'for-linus-4.1-1' of git://git.code.sf.net/p/openipmi/linux-ipmi
Pull IPMI fixes from Corey Minyard: "Lots of minor IPMI fixes, especially ones that have have come up since the SSIF driver has been in the main kernel for a while" * tag 'for-linus-4.1-1' of git://git.code.sf.net/p/openipmi/linux-ipmi: ipmi: Fix multi-part message handling ipmi: Add alert handling to SSIF ipmi: Fix a problem that messages are not issued in run_to_completion mode ipmi: Report an error if ACPI _IFT doesn't exist ipmi: Remove unused including <linux/version.h> ipmi: Don't report err in the SI driver for SSIF devices ipmi: Remove incorrect use of seq_has_overflowed ipmi:ssif: Ignore spaces when comparing I2C adapter names ipmi_ssif: Fix the logic on user-supplied addresses
2 parents 2a171aa + 3d69d43 commit 5198b44

File tree

4 files changed

+193
-45
lines changed

4 files changed

+193
-45
lines changed

Documentation/IPMI.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,10 @@ at module load time (for a module) with:
505505

506506
The addresses are normal I2C addresses. The adapter is the string
507507
name of the adapter, as shown in /sys/class/i2c-adapter/i2c-<n>/name.
508-
It is *NOT* i2c-<n> itself.
508+
It is *NOT* i2c-<n> itself. Also, the comparison is done ignoring
509+
spaces, so if the name is "This is an I2C chip" you can say
510+
adapter_name=ThisisanI2cchip. This is because it's hard to pass in
511+
spaces in kernel parameters.
509512

510513
The debug flags are bit flags for each BMC found, they are:
511514
IPMI messages: 1, driver state: 2, timing: 4, I2C probe: 8

drivers/char/ipmi/ipmi_msghandler.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2000,7 +2000,7 @@ static int smi_ipmb_proc_show(struct seq_file *m, void *v)
20002000
seq_printf(m, " %x", intf->channels[i].address);
20012001
seq_putc(m, '\n');
20022002

2003-
return seq_has_overflowed(m);
2003+
return 0;
20042004
}
20052005

20062006
static int smi_ipmb_proc_open(struct inode *inode, struct file *file)
@@ -2023,7 +2023,7 @@ static int smi_version_proc_show(struct seq_file *m, void *v)
20232023
ipmi_version_major(&intf->bmc->id),
20242024
ipmi_version_minor(&intf->bmc->id));
20252025

2026-
return seq_has_overflowed(m);
2026+
return 0;
20272027
}
20282028

20292029
static int smi_version_proc_open(struct inode *inode, struct file *file)

drivers/char/ipmi/ipmi_si_intf.c

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -942,8 +942,7 @@ static void sender(void *send_info,
942942
* If we are running to completion, start it and run
943943
* transactions until everything is clear.
944944
*/
945-
smi_info->curr_msg = msg;
946-
smi_info->waiting_msg = NULL;
945+
smi_info->waiting_msg = msg;
947946

948947
/*
949948
* Run to completion means we are single-threaded, no
@@ -2244,7 +2243,7 @@ static int ipmi_pnp_probe(struct pnp_dev *dev,
22442243
acpi_handle handle;
22452244
acpi_status status;
22462245
unsigned long long tmp;
2247-
int rv;
2246+
int rv = -EINVAL;
22482247

22492248
acpi_dev = pnp_acpi_device(dev);
22502249
if (!acpi_dev)
@@ -2262,8 +2261,10 @@ static int ipmi_pnp_probe(struct pnp_dev *dev,
22622261

22632262
/* _IFT tells us the interface type: KCS, BT, etc */
22642263
status = acpi_evaluate_integer(handle, "_IFT", NULL, &tmp);
2265-
if (ACPI_FAILURE(status))
2264+
if (ACPI_FAILURE(status)) {
2265+
dev_err(&dev->dev, "Could not find ACPI IPMI interface type\n");
22662266
goto err_free;
2267+
}
22672268

22682269
switch (tmp) {
22692270
case 1:
@@ -2276,6 +2277,7 @@ static int ipmi_pnp_probe(struct pnp_dev *dev,
22762277
info->si_type = SI_BT;
22772278
break;
22782279
case 4: /* SSIF, just ignore */
2280+
rv = -ENODEV;
22792281
goto err_free;
22802282
default:
22812283
dev_info(&dev->dev, "unknown IPMI type %lld\n", tmp);
@@ -2336,7 +2338,7 @@ static int ipmi_pnp_probe(struct pnp_dev *dev,
23362338

23372339
err_free:
23382340
kfree(info);
2339-
return -EINVAL;
2341+
return rv;
23402342
}
23412343

23422344
static void ipmi_pnp_remove(struct pnp_dev *dev)
@@ -3080,7 +3082,7 @@ static int smi_type_proc_show(struct seq_file *m, void *v)
30803082

30813083
seq_printf(m, "%s\n", si_to_str[smi->si_type]);
30823084

3083-
return seq_has_overflowed(m);
3085+
return 0;
30843086
}
30853087

30863088
static int smi_type_proc_open(struct inode *inode, struct file *file)
@@ -3153,7 +3155,7 @@ static int smi_params_proc_show(struct seq_file *m, void *v)
31533155
smi->irq,
31543156
smi->slave_addr);
31553157

3156-
return seq_has_overflowed(m);
3158+
return 0;
31573159
}
31583160

31593161
static int smi_params_proc_open(struct inode *inode, struct file *file)

0 commit comments

Comments
 (0)