* [I4L] dc_l1_init() double WORK_INIT kills off keyboard
@ 2003-11-28 2:02 Tonnerre Anklin
0 siblings, 0 replies; only message in thread
From: Tonnerre Anklin @ 2003-11-28 2:02 UTC (permalink / raw)
To: Linux Kernel Mailing List
[-- Attachment #1: Type: text/plain, Size: 1226 bytes --]
Salut,
Sometimes, dc_l1_init is called on an already initialized card state.
That wouldn't be too bad if there just wasn't that workqueue entry
which is going loopy then. This workqueue entry will have (amongst
others) the effect that no keyboard input will be accepted.
The fix here is to skip the work initialization if the work is already
in the work queue.
More on this patch can be found at
<URL:http://keepsake.keepsake.ch/~thunder/noyau/2.6.0-test11-ta1/dcl1_init_workqueue.xml>
Thunder
diff -Nur linux-2.6.0-test9-mm3/drivers/isdn/hisax/isdnl1.c linux-2.6.0-test9-mm3-ta1/drivers/isdn/hisax/isdnl1.c
--- linux-2.6.0-test9-mm3/drivers/isdn/hisax/isdnl1.c 2003-10-08 21:24:03.000000000 +0200
+++ linux-2.6.0-test9-mm3-ta1/drivers/isdn/hisax/isdnl1.c 2003-11-24 13:32:32.000000000 +0100
@@ -913,8 +913,10 @@
dc_l1_init(struct IsdnCardState *cs, struct dc_l1_ops *ops)
{
cs->dc_l1_ops = ops;
- INIT_WORK(&cs->work, ops->bh_func, cs);
- init_timer(&cs->dbusytimer);
+ if (!test_bit(0, &cs->work.pending) {
+ INIT_WORK(&cs->work, ops->bh_func, cs);
+ init_timer(&cs->dbusytimer);
+ }
cs->dbusytimer.function = (void *)(unsigned long) ops->dbusy_func;
cs->dbusytimer.data = (unsigned long) cs;
}
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-11-28 2:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-28 2:02 [I4L] dc_l1_init() double WORK_INIT kills off keyboard Tonnerre Anklin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).