Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6fb41cbd authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'for-linux-4.12' of git://github.com/cminyard/linux-ipmi

Pull IPMI updates from Corey Minyard:
 "A few fixes of things in the IPMI area, the watchdog would have issues
  at panic time cause by a recently introduced change, a problem with
  device numbering, one possible panic in the I2C driver (destined for
  stable).

  Nothing earth-shattering, but some things that need to go in"

* tag 'for-linux-4.12' of git://github.com/cminyard/linux-ipmi:
  ipmi/watchdog: fix wdog hang on panic waiting for ipmi response
  ipmi_si: use smi_num for init_name
  ipmi: bt-bmc: Add ast2500 compatible string
  ACPI / IPMI: change warning to debug on timeout
  ACPI / IPMI: allow ACPI_IPMI with IPMI_SSIF
  ipmi_ssif: use setup_timer
  ipmi: Fix kernel panic at ipmi_ssif_thread()
parents 5c6ba7d5 2c1175c2
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -6,7 +6,9 @@ perform in-band IPMI communication with their host.

Required properties:

- compatible : should be "aspeed,ast2400-ibt-bmc"
- compatible : should be one of
	"aspeed,ast2400-ibt-bmc"
	"aspeed,ast2500-ibt-bmc"
- reg: physical address and size of the registers

Optional properties:
+1 −1
Original line number Diff line number Diff line
@@ -256,7 +256,7 @@ config ACPI_PROCESSOR

config ACPI_IPMI
	tristate "IPMI"
	depends on IPMI_SI
	depends on IPMI_HANDLER
	default n
	help
	  This driver enables the ACPI to access the BMC controller. And it
+1 −2
Original line number Diff line number Diff line
@@ -429,8 +429,7 @@ static void ipmi_msg_handler(struct ipmi_recv_msg *msg, void *user_msg_data)
	if (msg->recv_type == IPMI_RESPONSE_RECV_TYPE &&
	    msg->msg.data_len == 1) {
		if (msg->msg.data[0] == IPMI_TIMEOUT_COMPLETION_CODE) {
			dev_WARN_ONCE(dev, true,
				      "Unexpected response (timeout).\n");
			dev_dbg_once(dev, "Unexpected response (timeout).\n");
			tx_msg->msg_done = ACPI_IPMI_TIMEOUT;
		}
		goto out_comp;
+1 −0
Original line number Diff line number Diff line
@@ -523,6 +523,7 @@ static int bt_bmc_remove(struct platform_device *pdev)

static const struct of_device_id bt_bmc_match[] = {
	{ .compatible = "aspeed,ast2400-ibt-bmc" },
	{ .compatible = "aspeed,ast2500-ibt-bmc" },
	{ },
};

+16 −3
Original line number Diff line number Diff line
@@ -1954,7 +1954,9 @@ static int hotmod_handler(const char *val, struct kernel_param *kp)
				kfree(info);
				goto out;
			}
			mutex_lock(&smi_infos_lock);
			rv = try_smi_init(info);
			mutex_unlock(&smi_infos_lock);
			if (rv) {
				cleanup_one_si(info);
				goto out;
@@ -2042,8 +2044,10 @@ static int hardcode_find_bmc(void)
		info->slave_addr = slave_addrs[i];

		if (!add_smi(info)) {
			mutex_lock(&smi_infos_lock);
			if (try_smi_init(info))
				cleanup_one_si(info);
			mutex_unlock(&smi_infos_lock);
			ret = 0;
		} else {
			kfree(info);
@@ -3492,6 +3496,11 @@ static int add_smi(struct smi_info *new_smi)
	return rv;
}

/*
 * Try to start up an interface.  Must be called with smi_infos_lock
 * held, primarily to keep smi_num consistent, we only one to do these
 * one at a time.
 */
static int try_smi_init(struct smi_info *new_smi)
{
	int rv = 0;
@@ -3524,9 +3533,12 @@ static int try_smi_init(struct smi_info *new_smi)
		goto out_err;
	}

	new_smi->intf_num = smi_num;

	/* Do this early so it's available for logs. */
	if (!new_smi->dev) {
		init_name = kasprintf(GFP_KERNEL, "ipmi_si.%d", 0);
		init_name = kasprintf(GFP_KERNEL, "ipmi_si.%d",
				      new_smi->intf_num);

		/*
		 * If we don't already have a device from something
@@ -3593,8 +3605,6 @@ static int try_smi_init(struct smi_info *new_smi)

	new_smi->interrupt_disabled = true;
	atomic_set(&new_smi->need_watch, 0);
	new_smi->intf_num = smi_num;
	smi_num++;

	rv = try_enable_event_buffer(new_smi);
	if (rv == 0)
@@ -3661,6 +3671,9 @@ static int try_smi_init(struct smi_info *new_smi)
		goto out_err_stop_timer;
	}

	/* Don't increment till we know we have succeeded. */
	smi_num++;

	dev_info(new_smi->dev, "IPMI %s interface initialized\n",
		 si_to_str[new_smi->si_type]);

Loading