Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Jun 2000 18:34:44 +0200
From:      Gary Jennejohn <garyj@peedub.muc.de>
To:        Paul Herman <pherman@frenchfries.net>
Cc:        freebsd-isdn@FreeBSD.ORG
Subject:   Re: i4b hangs during boot with ELSA Microlink 
Message-ID:  <200006201634.SAA07217@peedub.muc.de>
In-Reply-To: Your message of "Tue, 20 Jun 2000 12:58:08 %2B0200." <Pine.BSF.4.21.0006201012350.316-100000@bagabeedaboo.security.at12.de> 

next in thread | previous in thread | raw e-mail | index | archive | help
Paul Herman writes:
>On Sun, 18 Jun 2000, Gary Jennejohn wrote:
>
>> It looks like the card has a problem in the early stages of startup
>> when the cable is plugged in. It's generating interrupts which don't
>> seem to be getting cleared in the interrupt handler.
>> 
>> [...]
>> 
>> Actually, the Linux driver does quite a bit more. It reads the
>> interrupt register on the card (in FreeBSD parlance iobase1 + 0x4c)
>> and checks whether the card actually interrupted. This is missing
>> from i4b.
>
>So.  Update on what I've found.
>
>I saved iobase1 in a sc->sc_iobase1 when the card was attached, and
>during interrupt I checked:
>
>   inb(sc->iobase1 + 0x4c) & 0x04
>
>It was allways nonzero.  In fact, inb() allways returned a 0x45 off
>the card (with the same interrupt loop.)  So, no luck there.  :(
>
>Not ready for defeat, I persued the clrirq idea, and found a clrirq
>function, for elsa ISA cards which solely consisted of the line:
>
>   outb(sc->sc_iobase1 + 0x07, 0x00)
>
>Which hapens to be TRIGGER register, at least on the ISA card (?).  I
>put that in the interrupt function, which called outb() if it looped
>more than 5 times.  Still the same lock up during boot.  :(
>
>I'm out of ideas.  Does anybody have a tech contact at ELSA?  No email
>addresses on their web site.  Maybe I'll ask the i4linux crowd.
>

Hmmm, ugly hack time.

You say the card works if you wait to plug the cable in until after
everything is up.

This line
	outb(iobase1 + 0x4c, 0x41);	/* enable card interrupt */
is in the attach routine. Seems like, if this enables the interrupts,
the same register should disable/clear the interrupts.

Try writing a 0 followed by 0x41 to the register in clrirq.

The other thing which occurs to me is to not enable the interrupts in
attach, but rather to do a timeout with a callback to another routine.
Set the timeout fairly long to start with (maybe 60 seconds) and turn
on the interrupt in the callback routine. You can then experiment
to find the shortest timeout.

Even better would be to this after isdnd does its first open of the
card, but the routines which handle that are unfortunately not in the
driver :( Maybe you can figure out a way to do it with appropriate
ifdef's for your card. Ick.

---
Gary Jennejohn / garyj@muc.de gj@freebsd.org




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isdn" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200006201634.SAA07217>