On Fri, 03 Aug 2007 12:37:12 -0600 Jonathan Corbet <corbet@lwn.net> wrote:
This patch (which appears to have got stranded in Thomas's git-hrt tree)
breaks hotplugging of the wireless mouse on my Vaio.
Kinda strange - sometimes things come up and work but more often the
machine simply fails to notice that the mouse was plugged in at all.
It could be a bug in USB...
<gets a sinking feeling>
<looks down-thread>
ah shit, I already reported this bug on August 9 and I just spent an hour
and a half re-finding it. Thanks, guys.
Anyway, here's a fix which doesn't fix it:
- Don't return from msleep() in state TASK_[UN]INTERRUPTIBLE
- Someone seems to have fallen asleep on the enter key. Fix.
--- a/kernel/timer.c~git-hrt-fix
+++ a/kernel/timer.c
@@ -1347,7 +1347,6 @@ static struct notifier_block __cpuinitda
.notifier_call = timer_cpu_notify,
};
-
void __init init_timers(void)
{
int err = timer_cpu_notify(&timers_nb, (unsigned long)CPU_UP_PREPARE,
@@ -1360,9 +1359,6 @@ void __init init_timers(void)
open_softirq(TIMER_SOFTIRQ, run_timer_softirq, NULL);
}
-
-
-
static void do_msleep(unsigned int msecs, struct hrtimer_sleeper *sleeper,
int sigs)
{
@@ -1385,6 +1381,7 @@ static void do_msleep(unsigned int msecs
hrtimer_cancel(&sleeper->timer);
mode = HRTIMER_MODE_ABS;
} while (sleeper->task && !(sigs && signal_pending(current)));
+ set_current_state(TASK_RUNNING);
}
/**
_
I'll revert it.
-