Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 04 Dec 2003 10:46:46 +0200
From:      rk47 <rk@nanoteq.co.za>
To:        freebsd-questions@freebsd.org
Subject:   Missing Interrupts
Message-ID:  <bqmrul$dg2$1@sea.gmane.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bqmrul$dg2$1>