Commit 0fbecb4f authored by Corey Minyard's avatar Corey Minyard

ipmi: Remove smi->intf checks

Due to changes in the way shutdown is done, it is no longer
required to check that the interface is set.
Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
parent ebb339a5
...@@ -287,10 +287,7 @@ static void deliver_recv_msg(struct smi_info *smi_info, ...@@ -287,10 +287,7 @@ static void deliver_recv_msg(struct smi_info *smi_info,
struct ipmi_smi_msg *msg) struct ipmi_smi_msg *msg)
{ {
/* Deliver the message to the upper layer. */ /* Deliver the message to the upper layer. */
if (smi_info->intf) ipmi_smi_msg_received(smi_info->intf, msg);
ipmi_smi_msg_received(smi_info->intf, msg);
else
ipmi_free_smi_msg(msg);
} }
static void return_hosed_msg(struct smi_info *smi_info, int cCode) static void return_hosed_msg(struct smi_info *smi_info, int cCode)
...@@ -471,8 +468,7 @@ static void handle_flags(struct smi_info *smi_info) ...@@ -471,8 +468,7 @@ static void handle_flags(struct smi_info *smi_info)
start_clear_flags(smi_info); start_clear_flags(smi_info);
smi_info->msg_flags &= ~WDT_PRE_TIMEOUT_INT; smi_info->msg_flags &= ~WDT_PRE_TIMEOUT_INT;
if (smi_info->intf) ipmi_smi_watchdog_pretimeout(smi_info->intf);
ipmi_smi_watchdog_pretimeout(smi_info->intf);
} else if (smi_info->msg_flags & RECEIVE_MSG_AVAIL) { } else if (smi_info->msg_flags & RECEIVE_MSG_AVAIL) {
/* Messages available. */ /* Messages available. */
smi_info->curr_msg = alloc_msg_handle_irq(smi_info); smi_info->curr_msg = alloc_msg_handle_irq(smi_info);
...@@ -798,8 +794,7 @@ static enum si_sm_result smi_event_handler(struct smi_info *smi_info, ...@@ -798,8 +794,7 @@ static enum si_sm_result smi_event_handler(struct smi_info *smi_info,
* We prefer handling attn over new messages. But don't do * We prefer handling attn over new messages. But don't do
* this if there is not yet an upper layer to handle anything. * this if there is not yet an upper layer to handle anything.
*/ */
if (likely(smi_info->intf) && if (si_sm_result == SI_SM_ATTN || smi_info->got_attn) {
(si_sm_result == SI_SM_ATTN || smi_info->got_attn)) {
unsigned char msg[2]; unsigned char msg[2];
if (smi_info->si_state != SI_NORMAL) { if (smi_info->si_state != SI_NORMAL) {
......
...@@ -312,17 +312,13 @@ static void ipmi_ssif_unlock_cond(struct ssif_info *ssif_info, ...@@ -312,17 +312,13 @@ static void ipmi_ssif_unlock_cond(struct ssif_info *ssif_info,
static void deliver_recv_msg(struct ssif_info *ssif_info, static void deliver_recv_msg(struct ssif_info *ssif_info,
struct ipmi_smi_msg *msg) struct ipmi_smi_msg *msg)
{ {
struct ipmi_smi *intf = ssif_info->intf; if (msg->rsp_size < 0) {
if (!intf) {
ipmi_free_smi_msg(msg);
} else if (msg->rsp_size < 0) {
return_hosed_msg(ssif_info, msg); return_hosed_msg(ssif_info, msg);
pr_err(PFX pr_err(PFX
"Malformed message in deliver_recv_msg: rsp_size = %d\n", "Malformed message in deliver_recv_msg: rsp_size = %d\n",
msg->rsp_size); msg->rsp_size);
} else { } else {
ipmi_smi_msg_received(intf, msg); ipmi_smi_msg_received(ssif_info->intf, msg);
} }
} }
...@@ -449,12 +445,10 @@ static void start_recv_msg_fetch(struct ssif_info *ssif_info, ...@@ -449,12 +445,10 @@ static void start_recv_msg_fetch(struct ssif_info *ssif_info,
static void handle_flags(struct ssif_info *ssif_info, unsigned long *flags) static void handle_flags(struct ssif_info *ssif_info, unsigned long *flags)
{ {
if (ssif_info->msg_flags & WDT_PRE_TIMEOUT_INT) { if (ssif_info->msg_flags & WDT_PRE_TIMEOUT_INT) {
struct ipmi_smi *intf = ssif_info->intf;
/* Watchdog pre-timeout */ /* Watchdog pre-timeout */
ssif_inc_stat(ssif_info, watchdog_pretimeouts); ssif_inc_stat(ssif_info, watchdog_pretimeouts);
start_clear_flags(ssif_info, flags); start_clear_flags(ssif_info, flags);
if (intf) ipmi_smi_watchdog_pretimeout(ssif_info->intf);
ipmi_smi_watchdog_pretimeout(intf);
} else if (ssif_info->msg_flags & RECEIVE_MSG_AVAIL) } else if (ssif_info->msg_flags & RECEIVE_MSG_AVAIL)
/* Messages available. */ /* Messages available. */
start_recv_msg_fetch(ssif_info, flags); start_recv_msg_fetch(ssif_info, flags);
......
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