Subject: Re: network on Netra does not work
To: Manuel Bouyer <bouyer@antioche.eu.org>
From: Martin Husemann <martin@duskware.de>
List: port-sparc64
Date: 10/13/2002 16:25:37
On Sat, Oct 12, 2002 at 06:22:44PM +0200, Manuel Bouyer wrote:

> Looks like interrupt are not working.
> But I wonder if the "interrupting at ivec 0" is right.

No, and this is the second report of something like this happening.

I have no idea what is wrong, the place where it happens is in
sys/arch/sparc64/dev/pci_machdep.c around line 409:

        if (OF_mapintr(node, &interrupts, sizeof(interrupts),
                sizeof(interrupts)) < 0) {
                printf("OF_mapintr failed\n");
        }  
        /* Try to find an IPL for this type of device. */
        if (OF_getprop(node, "device_type", &devtype, sizeof(devtype)) > 0) {
                for (len = 0;  intrmap[len].in_class; len++)
                        if (strcmp(intrmap[len].in_class, devtype) == 0) {
                                interrupts |= INTLEVENCODE(intrmap[len].in_lev);                                break;
                        }
        }


After this the variable "interrupts" should contain something sensible != 0,
but apparently it sometimes gets set to 0 (i.e. we got an interrupt from OF,
but did not find a proper IPL for it)

If someone spots the bug in this code, or someone to whom it is happening
could add some printfs there (i.e. to see the parameters of the strcmp()
call) and send the results, this would be greatly apreciated.

Martin