Subject: Re: Re: kernel panic: what next?---- maybe a PR?
To: Lazaro Daniel Salem <SALEM@statoil.com>
From: David Maxwell <david@fundy.ca>
List: port-i386
Date: 11/24/1999 21:32:40
On Thu, Nov 25, 1999 at 12:18:39AM +0100, Lazaro Daniel Salem wrote:
> 
> You were right sb0 (the soundblaster Pro) was taking the IRQ 5
> So this is the correct transcript of the boot messages:
> sb0 at isa0 port 0x220-0x237 irq 5 drq 1: dsp v3.01
...
> omms0 at isa0 port 0x23c-0x23f irq 5
> panic: intr_establish: irq 5 can't share edge-triggered with pulsed
> Stopped in at _Deebugger+0x4: leave
> db>
> -------------------------------------
> After your mail I checked the jumpers at the SoundBlaster Pro card and to
> my surprise
> the jumper for the IRQ 7 was set on the card (factory default) and not the
> one on IRQ 5
> as detected at boot time by the NetBSD kernel.
> 
> Just in case, I moved the jumper to IRQ 2 and NetBSD still reported IRQ 5
> and the NetBSD kernel reported again IRQ 5 with exactly the same resulting
> panic.

I don't know what I'm talking about here, so I'll say what I think
and hope someone educates me ;-)

Probes for ISA cards are done by stuffing bits into the registers 
(listed in the devices for the kernel you're running) at various
memory addresses, and seeing what comes out. The probes look for
certain results as indicating that device 'xx' is present. Some
probes are more accurate (because some devices have a better
initialization sequence) and some are less accurate. For some ISA
cards, the device can show a match because the IO address of the
card is correct (0x220 here) and stuffing bits in causing the right
result. Some devices however don't report their IRQ setting in
the bits that come back.

For some cards, tests can be done during the probe, to force the
card to send an interrupt. Then the kernel can confirm the 
setting. For some cards, that's either not possible, or not a
'safe' thing to do.

The GENERIC kernel ships with:

sb0     at isa? port 0x220 irq 5 drq 1 drq2 5   # SoundBlaster
omms0   at isa? port 0x23c irq 5        # Microsoft InPort mouse 

So, for isa only (non-PnP) cards, that's the only valid config
without compiling a new kernel. These two cards won't co-exist
in the default config. However, those are the most common settings
for these two devices, so it's a best compromise case.

In any case, you'll need to compile a kernel. If you have the
sources already, yank the sb card, compile a kernel with the
sb line changed to this:

sb0     at isa? port 0x220 irq 9 drq 1 drq2 5   # SoundBlaster

And set your sb to IRQ 2. (That's an IBM-ism, irq 2 == irq 9)

If you don't have kernel sources set up, tell me which version
you're trying to use, and I'll build a kernel with that change
for you, and put it where you can ftp it.

-- 
David Maxwell, david@vex.net|david@maxwell.net -->
Any sufficiently advanced Common Sense will seem like magic... 
					      - me