Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 198793
b: refs/heads/master
c: 3326f4f
h: refs/heads/master
i:
  198791: 7afff66
v: v3
  • Loading branch information
Matthew Garrett authored and Linus Torvalds committed May 27, 2010
1 parent fe72eca commit b8b6fd4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ea4078ca1a7a3a198e519c2a7a2ed6126e40b130
refs/heads/master: 3326f4f2276791561af1fd5f2020be0186459813
20 changes: 13 additions & 7 deletions trunk/drivers/char/ipmi/ipmi_si_intf.c
Original file line number Diff line number Diff line change
Expand Up @@ -893,6 +893,9 @@ static void sender(void *send_info,

mod_timer(&smi_info->si_timer, jiffies + SI_TIMEOUT_JIFFIES);

if (smi_info->thread)
wake_up_process(smi_info->thread);

if (smi_info->run_to_completion) {
/*
* If we are running to completion, then throw it in
Expand Down Expand Up @@ -1013,6 +1016,8 @@ static int ipmi_thread(void *data)
; /* do nothing */
else if (smi_result == SI_SM_CALL_WITH_DELAY && busy_wait)
schedule();
else if (smi_result == SI_SM_IDLE)
schedule_timeout_interruptible(100);
else
schedule_timeout_interruptible(0);
}
Expand Down Expand Up @@ -1055,6 +1060,7 @@ static void smi_timeout(unsigned long data)
unsigned long flags;
unsigned long jiffies_now;
long time_diff;
long timeout;
#ifdef DEBUG_TIMING
struct timeval t;
#endif
Expand All @@ -1075,9 +1081,9 @@ static void smi_timeout(unsigned long data)

if ((smi_info->irq) && (!smi_info->interrupt_disabled)) {
/* Running with interrupts, only do long timeouts. */
smi_info->si_timer.expires = jiffies + SI_TIMEOUT_JIFFIES;
timeout = jiffies + SI_TIMEOUT_JIFFIES;
smi_inc_stat(smi_info, long_timeouts);
goto do_add_timer;
goto do_mod_timer;
}

/*
Expand All @@ -1086,15 +1092,15 @@ static void smi_timeout(unsigned long data)
*/
if (smi_result == SI_SM_CALL_WITH_DELAY) {
smi_inc_stat(smi_info, short_timeouts);
smi_info->si_timer.expires = jiffies + 1;
timeout = jiffies + 1;
} else {
smi_inc_stat(smi_info, long_timeouts);
smi_info->si_timer.expires = jiffies + SI_TIMEOUT_JIFFIES;
timeout = jiffies + SI_TIMEOUT_JIFFIES;
}

do_add_timer:
if ((smi_result != SI_SM_IDLE) || smi_info->interrupt_disabled)
add_timer(&(smi_info->si_timer));
do_mod_timer:
if (smi_result != SI_SM_IDLE)
mod_timer(&(smi_info->si_timer), timeout);
}

static irqreturn_t si_irq_handler(int irq, void *data)
Expand Down

0 comments on commit b8b6fd4

Please sign in to comment.