Skip to content

Commit

Permalink
Merge tag 'for-linus-4.1-1' of git://git.code.sf.net/p/openipmi/linux…
Browse files Browse the repository at this point in the history
…-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
  • Loading branch information
torvalds committed May 6, 2015
2 parents 2a171aa + 3d69d43 commit 5198b44
Show file tree
Hide file tree
Showing 4 changed files with 193 additions and 45 deletions.
5 changes: 4 additions & 1 deletion Documentation/IPMI.txt
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,10 @@ at module load time (for a module) with:

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.
It is *NOT* i2c-<n> itself.
It is *NOT* i2c-<n> itself. Also, the comparison is done ignoring
spaces, so if the name is "This is an I2C chip" you can say
adapter_name=ThisisanI2cchip. This is because it's hard to pass in
spaces in kernel parameters.

The debug flags are bit flags for each BMC found, they are:
IPMI messages: 1, driver state: 2, timing: 4, I2C probe: 8
Expand Down
4 changes: 2 additions & 2 deletions drivers/char/ipmi/ipmi_msghandler.c
Original file line number Diff line number Diff line change
Expand Up @@ -2000,7 +2000,7 @@ static int smi_ipmb_proc_show(struct seq_file *m, void *v)
seq_printf(m, " %x", intf->channels[i].address);
seq_putc(m, '\n');

return seq_has_overflowed(m);
return 0;
}

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

return seq_has_overflowed(m);
return 0;
}

static int smi_version_proc_open(struct inode *inode, struct file *file)
Expand Down
16 changes: 9 additions & 7 deletions drivers/char/ipmi/ipmi_si_intf.c
Original file line number Diff line number Diff line change
Expand Up @@ -942,8 +942,7 @@ static void sender(void *send_info,
* If we are running to completion, start it and run
* transactions until everything is clear.
*/
smi_info->curr_msg = msg;
smi_info->waiting_msg = NULL;
smi_info->waiting_msg = msg;

/*
* Run to completion means we are single-threaded, no
Expand Down Expand Up @@ -2244,7 +2243,7 @@ static int ipmi_pnp_probe(struct pnp_dev *dev,
acpi_handle handle;
acpi_status status;
unsigned long long tmp;
int rv;
int rv = -EINVAL;

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

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

switch (tmp) {
case 1:
Expand All @@ -2276,6 +2277,7 @@ static int ipmi_pnp_probe(struct pnp_dev *dev,
info->si_type = SI_BT;
break;
case 4: /* SSIF, just ignore */
rv = -ENODEV;
goto err_free;
default:
dev_info(&dev->dev, "unknown IPMI type %lld\n", tmp);
Expand Down Expand Up @@ -2336,7 +2338,7 @@ static int ipmi_pnp_probe(struct pnp_dev *dev,

err_free:
kfree(info);
return -EINVAL;
return rv;
}

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

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

return seq_has_overflowed(m);
return 0;
}

static int smi_type_proc_open(struct inode *inode, struct file *file)
Expand Down Expand Up @@ -3153,7 +3155,7 @@ static int smi_params_proc_show(struct seq_file *m, void *v)
smi->irq,
smi->slave_addr);

return seq_has_overflowed(m);
return 0;
}

static int smi_params_proc_open(struct inode *inode, struct file *file)
Expand Down
Loading

0 comments on commit 5198b44

Please sign in to comment.