Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Mar 2006 11:08:23 -0500
From:      John Baldwin <jhb@freebsd.org>
To:        Oleg Sharoiko <os@rsu.ru>
Cc:        freebsd-scsi@freebsd.org, Andrey Beresovsky <and@rsu.ru>
Subject:   Re: Boot hangs on ips0: resetting adapter, this may take up to 5 minutes
Message-ID:  <200603281108.25548.jhb@freebsd.org>
In-Reply-To: <20060328185449.F763@brain.cc.rsu.ru>
References:  <20060215102749.D58480@brain.cc.rsu.ru> <200603271607.09550.jhb@freebsd.org> <20060328185449.F763@brain.cc.rsu.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday 28 March 2006 10:45, Oleg Sharoiko wrote:
> 
> On Mon, 27 Mar 2006, John Baldwin wrote:
> 
> JB>Which device is not getting interrupts and hanging?  You said all your
> JB>SCSI cards work fine with bge0 (IRQ16) is not in the kernel, yes?  What
> JB>if you disable just the devices on IRQ16 (bge and usb) do all of your
> JB>various SCSI cards work fine in that case?
> 
> Yes, as soon as I remove bge from kernel all other devices work fine. I 
> couldn't figure out which particular device is mis-routed, because when 
> interrupt storm happens the system becomes unresponsive and it's 
> impossible to tell which devices work and which not.

Is this an Intel box?

> And interrupt storm only happens on single CPU when PREEMPTION is in 
> effect. Without PREEMPTION kernel with bge works. With SMP kernel I can 
> kldload if_bge when 2nd CPU has been already initialized, though I haven't 
> run many tests and this last setup is probably unstable.
> 
> By the way, shouldn't ithread_execute_handlers detect interrupt storm 
> condition? As I can see it has corresponding code, but in my case storm is 
> not detected.

It only detects it if the interrupt line is constantly on.  If the interrupt
line goes off for a little bit and then back on often enough the istorm logic
won't kick in.  You can try lowering the threshold via the tunable to see if
you can get it to kick in perhaps.

> BIOS has a page "PCI interrupt routing" which currently contains:
> 
> Planar USB IRQ              [Auto Configure] 
> Current Interrupt Assigned  10               
> SCSI INTA IRQ               [Auto Configure] 
> Current Interrupt Assigned  11               
> SCSI INTB IRQ               [Auto Configure] 
> Current Interrupt Assigned  10               
> Planar Video IRQ            [Auto Configure] 
> Current Interrupt Assigned  11               
> Planar Ethernet IRQ         [Auto Configure] 
> Current Interrupt Assigned  11               
> Slot1 INTA IRQ              [No IRQ reqested]
> Current Interrupt Assigned  No IRQ reqested  
> Slot2 INTA IRQ              [No IRQ reqested]
> Current Interrupt Assigned  No IRQ reqested  
> Slot3 INTA IRQ              [No IRQ reqested]
> Current Interrupt Assigned  No IRQ reqested  
> Slot4 INTA IRQ              [Auto Configure] 
> Current Interrupt Assigned  11               
> Slot5 INTA IRQ              [No IRQ reqested]
> Current Interrupt Assigned  No IRQ reqested  
> Slot6 INTA IRQ              [No IRQ reqested]
> Current Interrupt Assigned  No IRQ reqested
> 
> In this menu SLOT4 INTA is linked with Ethernet and they change together 
> whenever I alter one of them.
> 
> I suppose, this values correspond to 'irq=' from dmesg output:
> 
> found-> vendor=0x14e4, dev=0x1659, revid=0x11
>         bus=1, slot=0, func=0
>         class=02-00-00, hdrtype=0x00, mfdev=0
>         cmdreg=0x0146, statreg=0x0010, cachelnsz=8 (dwords)
>         lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
>         intpin=a, irq=11
>         powerspec 2  supports D0 D3  current D0
>         MSI supports 8 messages, 64 bit
>         map[10]: type 1, range 64, base d0100000, size 16, enabled
> pcib1: (null) requested memory range 0xd0100000-0xd010ffff: good
> 
> Dut I don't understand the next lines
> 
> pcib0: matched entry for 0.2.INTA
> pcib0: slot 2 INTA hardwired to IRQ 16
> pcib1: slot 0 INTA is routed to irq 16
> 
> What does 'hardwired' mean and why irq number is different.

Because on x86 there are two completely different sets of interrupt
controllers.  The AT-compatible 8259A pair of PICs provides ISA IRQs
0-15, and when using the 8259As, PCI interrupts are routed to a PCI
interrupt router that forwards the PCI interrupts onto the ISA IRQs.

The second set of interrupt contollers are called APICs.  A system can
have 1 or more I/O APICs, each of which can have anywhere from 16 to 32
individual interrupt pins (usually 16, 24, or 32).  Each PCI interrupt
usually gets its own private interrupt pin that it doesn't have to share
with any other interrupts, and any ISA interrupts are routed to pins
0-15 on the first I/O APIC.  The OS is required to use APICs in SMP mode
for several reasons (you have to use APICs to do IPIs for example).  The
messages above show that your device's interrupt line is connected to
pin 16 on the first I/O APIC (thus, IRQ 16).

-- 
John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org



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