From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 4 00:50:45 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7266416A4CE for ; Thu, 4 Dec 2003 00:50:45 -0800 (PST) Received: from main.gmane.org (main.gmane.org [80.91.224.249]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5329F43F85 for ; Thu, 4 Dec 2003 00:50:44 -0800 (PST) (envelope-from freebsd-hackers@m.gmane.org) Received: from root by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1ARpC7-00047F-00 for ; Thu, 04 Dec 2003 09:50:43 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org Received: from sea.gmane.org ([80.91.224.252]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1ARouh-0003wd-00 for ; Thu, 04 Dec 2003 09:32:43 +0100 Received: from news by sea.gmane.org with local (Exim 3.35 #1 (Debian)) id 1ARouh-0003Ph-00 for ; Thu, 04 Dec 2003 09:32:43 +0100 From: rk47 Date: Thu, 04 Dec 2003 10:38:16 +0200 Organization: nanoteq Lines: 52 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: usenet@sea.gmane.org User-Agent: KNode/0.7.2 Sender: news Subject: Missing Interupts? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Dec 2003 08:50:45 -0000 I am developing a device driver for a processing type PCI card on FreeBSD 4.8. I just can't seem to get my interrupts working. How can I find out what is going wrong? 1. allocation returns without error rid = 0; sc->sc_irq = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, 0, ~0, 1, RF_SHAREABLE|RF_ACTIVE); 2. interrupt setup returns without errors bus_setup_intr(dev, sc->sc_irq, INTR_TYPE_NET, ncc_intr, sc, &sc->sc_intrhand)) 2.1 The interupt handler exists. static void ncc_intr(void *arg) { ... } 3. I can write to the PCI cards control registers, I confirm this by an LED on the card. 4. There is a "force interrupt" register on the PCI card which I write to but nothing happens. 5. We also have a win32 driver for this card can successfully force an interrupt. 6. I did have it working a long time ago but now i dont know what I'm doing wrong. "vmstat -i" gives the following: interrupt total rate stray irq7 1 0 fxp0 irq3 4384 1 ata0 irq14 2840 1 ata1 irq15 4 0 atkbd0 irq1 1680 0 clk irq0 273172 99 rtc irq8 349672 127 Total 631753 231 Loading the module (KLD) gives the following ncc0 mem 0xe7abfc00-0xe6abffff,0xe6ac0000-0xe6afffff irq 5 at device 4.0 on pci1 Riaan