Commit 21c8f915 authored by Corey Minyard's avatar Corey Minyard
Browse files

ipmi_ssif: Fix logic around alert handling



There was a mistake in the logic, if an alert came in very quickly
it would hang the driver.
Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
parent 9dffdb38
...@@ -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