Commit f7813ad5 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'for-linus-4.6' of git://git.code.sf.net/p/openipmi/linux-ipmi

Pull IPMI updates from Corey Minyard:
 "Just some minor fixes, nothing big"

* tag 'for-linus-4.6' of git://git.code.sf.net/p/openipmi/linux-ipmi:
  ipmi: do not probe ACPI devices if si_tryacpi is unset
  ipmi_si: Avoid a wrong long timeout on transaction done
  ipmi_si: Fix module parameter doc names
  ipmi_ssif: Fix logic around alert handling
parents 12e7b0a6 9f0257b3
...@@ -849,7 +849,7 @@ static enum si_sm_result smi_event_handler(struct smi_info *smi_info, ...@@ -849,7 +849,7 @@ static enum si_sm_result smi_event_handler(struct smi_info *smi_info,
smi_inc_stat(smi_info, complete_transactions); smi_inc_stat(smi_info, complete_transactions);
handle_transaction_done(smi_info); handle_transaction_done(smi_info);
si_sm_result = smi_info->handlers->event(smi_info->si_sm, 0); goto restart;
} else if (si_sm_result == SI_SM_HOSED) { } else if (si_sm_result == SI_SM_HOSED) {
smi_inc_stat(smi_info, hosed_count); smi_inc_stat(smi_info, hosed_count);
...@@ -866,7 +866,7 @@ static enum si_sm_result smi_event_handler(struct smi_info *smi_info, ...@@ -866,7 +866,7 @@ static enum si_sm_result smi_event_handler(struct smi_info *smi_info,
*/ */
return_hosed_msg(smi_info, IPMI_ERR_UNSPECIFIED); return_hosed_msg(smi_info, IPMI_ERR_UNSPECIFIED);
} }
si_sm_result = smi_info->handlers->event(smi_info->si_sm, 0); goto restart;
} }
/* /*
...@@ -1363,12 +1363,12 @@ MODULE_PARM_DESC(trydmi, "Setting this to zero will disable the" ...@@ -1363,12 +1363,12 @@ MODULE_PARM_DESC(trydmi, "Setting this to zero will disable the"
" default scan of the interfaces identified via DMI"); " default scan of the interfaces identified via DMI");
#endif #endif
module_param_named(tryplatform, si_tryplatform, bool, 0); module_param_named(tryplatform, si_tryplatform, bool, 0);
MODULE_PARM_DESC(tryacpi, "Setting this to zero will disable the" MODULE_PARM_DESC(tryplatform, "Setting this to zero will disable the"
" default scan of the interfaces identified via platform" " default scan of the interfaces identified via platform"
" interfaces like openfirmware"); " interfaces like openfirmware");
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
module_param_named(trypci, si_trypci, bool, 0); module_param_named(trypci, si_trypci, bool, 0);
MODULE_PARM_DESC(tryacpi, "Setting this to zero will disable the" MODULE_PARM_DESC(trypci, "Setting this to zero will disable the"
" default scan of the interfaces identified via pci"); " default scan of the interfaces identified via pci");
#endif #endif
module_param_named(trydefaults, si_trydefaults, bool, 0); module_param_named(trydefaults, si_trydefaults, bool, 0);
...@@ -2690,6 +2690,9 @@ static int acpi_ipmi_probe(struct platform_device *dev) ...@@ -2690,6 +2690,9 @@ static int acpi_ipmi_probe(struct platform_device *dev)
unsigned long long tmp; unsigned long long tmp;
int rv = -EINVAL; int rv = -EINVAL;
if (!si_tryacpi)
return 0;
handle = ACPI_HANDLE(&dev->dev); handle = ACPI_HANDLE(&dev->dev);
if (!handle) if (!handle)
return -ENODEV; return -ENODEV;
......
...@@ -920,23 +920,18 @@ static void msg_written_handler(struct ssif_info *ssif_info, int result, ...@@ -920,23 +920,18 @@ static void msg_written_handler(struct ssif_info *ssif_info, int result,
msg_done_handler(ssif_info, -EIO, NULL, 0); msg_done_handler(ssif_info, -EIO, NULL, 0);
} }
} else { } else {
/* Ready to request the result. */
unsigned long oflags, *flags; unsigned long oflags, *flags;
bool got_alert;
ssif_inc_stat(ssif_info, sent_messages); ssif_inc_stat(ssif_info, sent_messages);
ssif_inc_stat(ssif_info, sent_messages_parts); ssif_inc_stat(ssif_info, sent_messages_parts);
flags = ipmi_ssif_lock_cond(ssif_info, &oflags); flags = ipmi_ssif_lock_cond(ssif_info, &oflags);
got_alert = ssif_info->got_alert; if (ssif_info->got_alert) {
if (got_alert) { /* The result is already ready, just start it. */
ssif_info->got_alert = false; ssif_info->got_alert = false;
ssif_info->waiting_alert = false;
}
if (got_alert) {
ipmi_ssif_unlock_cond(ssif_info, flags); ipmi_ssif_unlock_cond(ssif_info, flags);
/* The alert already happened, try now. */ start_get(ssif_info);
retry_timeout((unsigned long) ssif_info);
} else { } else {
/* Wait a jiffie then request the next message */ /* Wait a jiffie then request the next message */
ssif_info->waiting_alert = true; ssif_info->waiting_alert = true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment