From owner-freebsd-questions@FreeBSD.ORG Thu Dec 4 00:41:03 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DDFBF16A4CE for ; Thu, 4 Dec 2003 00:41:03 -0800 (PST) Received: from main.gmane.org (main.gmane.org [80.91.224.249]) by mx1.FreeBSD.org (Postfix) with ESMTP id AD41643F75 for ; Thu, 4 Dec 2003 00:41:01 -0800 (PST) (envelope-from freebsd-questions@m.gmane.org) Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1ARp2h-00040x-00 for ; Thu, 04 Dec 2003 09:40:59 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-questions@freebsd.org Received: from sea.gmane.org ([80.91.224.252]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1ARp2f-00040p-00 for ; Thu, 04 Dec 2003 09:40:57 +0100 Received: from news by sea.gmane.org with local (Exim 3.35 #1 (Debian)) id 1ARp2f-0003cX-00 for ; Thu, 04 Dec 2003 09:40:57 +0100 From: rk47 Date: Thu, 04 Dec 2003 10:46:46 +0200 Organization: nanoteq Lines: 50 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 Interrupts X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Dec 2003 08:41:04 -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