mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Voegtle <tv@lio96.de>
To: linux-kernel@vger.kernel.org, Robert Hancock <hancockr@shaw.ca>,
	akpm@linux-foundation.org
Cc: Bastian Friedrich <bastian@bastian-friedrich.de>
Subject: Re: [Patch] sane irq initialization in sedlbauer/hisax (was: hisax isdn card (Sedlbauer Speed Fax+) does not get an interrupt)
Date: Tue, 5 Jun 2007 17:52:04 +0200 (CEST)	[thread overview]
Message-ID: <Pine.LNX.4.63.0706051315090.20996@er-systems.de> (raw)
In-Reply-To: <Pine.LNX.4.63.0705311520150.9151@er-systems.de>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 2900 bytes --]

Hi,

On Thu, 31 May 2007, Thomas Voegtle wrote:
> ==========================================================================
[...]
> <06>2007 May 30 14:21:40 cbs kern: Sedlbauer: PCI base adr 0xa800
> <03>2007 May 30 14:21:40 cbs kern: irq 11: nobody cared (try booting with the \"irqpoll\" option)
[...]
> <03>2007 May 30 14:21:40 cbs kern: handlers:
> <03>2007 May 30 14:21:40 cbs kern: [<c030899d>] (usb_hcd_irq+0x0/0x4f)
> <00>2007 May 30 14:21:40 cbs kern: Disabling IRQ #11



As described, the interrupt handler is registered too late, so early 
incoming interrupts lead to the original problem. The patch first disables 
the interrupts (byteout(..., 0)), then registers the irq, and finally 
enables the irqs again (byteout(..., 2) as was done at the first point 
before).

Please note that the patch was developed without access to technical 
specifications; the /exact/ meaning of the constants being written to the 
registers are unknown.

Patch applies to 2.6.22-rc4.

Signed-off-by: Bastian Friedrich <bastian@bastian-friedrich.de>
Signed-off-by: Thomas Voegtle <tv@lio96.de>


diff -uNr linux-2.6.22rc4/drivers/isdn/hisax/config.c linux-2.6.22rc4/drivers/isdn/hisax/config.c
--- linux-2.6.22rc4/drivers/isdn/hisax/config.c	2007-06-05 17:16:24.000000000 +0200
+++ linux-2.6.22rc4/drivers/isdn/hisax/config.c	2007-06-05 17:20:28.000000000 +0200
@@ -511,6 +511,7 @@
 
 #if CARD_SEDLBAUER
 extern int setup_sedlbauer(struct IsdnCard *card);
+extern void sedlbauer_enable_interrupts(struct IsdnCardState *cs);
 #endif
 
 #if CARD_SPORTSTER
@@ -822,6 +823,7 @@
 		       cs->irq);
 		return 1;
 	}
+	sedlbauer_enable_interrupts(cs);
 	while (cnt) {
 		cs->cardmsg(cs, CARD_INIT, NULL);
 		/* Timeout 10ms */
diff -uNr linux-2.6.22rc4/drivers/isdn/hisax/sedlbauer.c linux-2.6.22rc4/drivers/isdn/hisax/sedlbauer.c
--- linux-2.6.22rc4/drivers/isdn/hisax/sedlbauer.c	2007-04-26 05:08:32.000000000 +0200
+++ linux-2.6.22rc4/drivers/isdn/hisax/sedlbauer.c	2007-06-05 17:20:28.000000000 +0200
@@ -529,6 +529,19 @@
 static struct pnp_card *pnp_c __devinitdata = NULL;
 #endif
 
+int
+sedlbauer_enable_interrupts(struct IsdnCardState *cs)
+{
+#ifdef CONFIG_PCI
+	if ((cs->typ == ISDN_CTYPE_SEDLBAUER) ||
+	   (cs->typ == ISDN_CTYPE_SEDLBAUER_FAX)) {
+		byteout(cs->hw.sedl.cfg_reg+ 5, 0x02);
+	}
+#endif
+	return 0;
+}
+
+
 int __devinit
 setup_sedlbauer(struct IsdnCard *card)
 {
@@ -667,7 +680,8 @@
 		byteout(cs->hw.sedl.cfg_reg, 0xff);
 		byteout(cs->hw.sedl.cfg_reg, 0x00);
 		byteout(cs->hw.sedl.cfg_reg+ 2, 0xdd);
-		byteout(cs->hw.sedl.cfg_reg+ 5, 0x02);
+		byteout(cs->hw.sedl.cfg_reg+ 5, 0x00);
+			 /* 0 seems to be "disable". Enable (-> 0x02) later! */
 		byteout(cs->hw.sedl.cfg_reg +3, cs->hw.sedl.reset_on);
 		mdelay(2);
 		byteout(cs->hw.sedl.cfg_reg +3, cs->hw.sedl.reset_off);






-- 
 Thomas Vögtle    email: thomas@voegtle-clan.de
 ----- http://www.voegtle-clan.de/thomas ------

      reply	other threads:[~2007-06-05 15:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-31 13:44 hisax isdn card (Sedlbauer Speed Fax+) does not get an interrupt Thomas Voegtle
2007-06-05 15:52 ` Thomas Voegtle [this message]

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=Pine.LNX.4.63.0706051315090.20996@er-systems.de \
    --to=tv@lio96.de \
    --cc=akpm@linux-foundation.org \
    --cc=bastian@bastian-friedrich.de \
    --cc=hancockr@shaw.ca \
    --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

all inboxes | Powered by JetHome®