提交 4064d5ef 编写于 作者: C Corey Minyard 提交者: Linus Torvalds

[PATCH] IPMI: fix handling of OEM flags

If one of the OEM flags becomes set in the flags from the hardware, the
driver could hang if no OEM handler was set.  Fix the code to handle this.
This was tested by setting the flags by hand after they were fetched.
Signed-off-by: NCorey Minyard <minyard@acm.org>
Ackde-by: NMatt Domsch <Matt_Domsch@dell.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 8f5cbd7e
......@@ -402,10 +402,10 @@ static void handle_flags(struct smi_info *smi_info)
smi_info->curr_msg->data,
smi_info->curr_msg->data_size);
smi_info->si_state = SI_GETTING_EVENTS;
} else if (smi_info->msg_flags & OEM_DATA_AVAIL) {
if (smi_info->oem_data_avail_handler)
if (smi_info->oem_data_avail_handler(smi_info))
goto retry;
} else if (smi_info->msg_flags & OEM_DATA_AVAIL &&
smi_info->oem_data_avail_handler) {
if (smi_info->oem_data_avail_handler(smi_info))
goto retry;
} else {
smi_info->si_state = SI_NORMAL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册