linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tonnerre Anklin <thunder@keepsake.ch>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [I4L] dc_l1_init() double WORK_INIT kills off keyboard
Date: Fri, 28 Nov 2003 03:02:29 +0100	[thread overview]
Message-ID: <20031128020229.GH1635@dbintra.dmz.lightweight.ods.org> (raw)

[-- 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 --]

                 reply	other threads:[~2003-11-28  2:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20031128020229.GH1635@dbintra.dmz.lightweight.ods.org \
    --to=thunder@keepsake.ch \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).