From owner-freebsd-scsi@FreeBSD.ORG Tue Mar 28 16:08:37 2006 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CA8DD16A41F for ; Tue, 28 Mar 2006 16:08:37 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id BC6D643DFA for ; Tue, 28 Mar 2006 16:07:40 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost (john@localhost [127.0.0.1]) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k2SG7Yk2070474; Tue, 28 Mar 2006 11:07:34 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: Oleg Sharoiko Date: Tue, 28 Mar 2006 11:08:23 -0500 User-Agent: KMail/1.9.1 References: <20060215102749.D58480@brain.cc.rsu.ru> <200603271607.09550.jhb@freebsd.org> <20060328185449.F763@brain.cc.rsu.ru> In-Reply-To: <20060328185449.F763@brain.cc.rsu.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200603281108.25548.jhb@freebsd.org> X-Virus-Scanned: ClamAV 0.87.1/1359/Tue Mar 28 06:49:08 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-3.8 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx Cc: freebsd-scsi@freebsd.org, Andrey Beresovsky Subject: Re: Boot hangs on ips0: resetting adapter, this may take up to 5 minutes X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Mar 2006 16:08:37 -0000 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 <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org