Hi all,

I am running 4.1 on a Dell Latitude LS notebook. This machine uses the
"Neomagic MagicMedia 256AV" audio chip:

...
neo0 at pci1 dev 0 function 1 "Neomagic MagicMedia 256AV" rev 0x20
audio0 at neo0
...

Now, _sometimes_ the boot gets into an endless loop saying

        "neo0: unknown int"

Looking at the source, I see that (sys/dev/pci/neo.c)


/* The interrupt handler */
int
neo_intr(void *p)
{
        struct neo_softc *sc = (struct neo_softc *)p;
        int status, x;
        int rv = 0;

        status = nm_rd(sc, NM_INT_REG, sc->irsz);

        if (status & sc->playint) {
                status &= ~sc->playint;

                sc->pwmark += sc->pblksize;
                sc->pwmark %= sc->pbufsize;

                nm_wr(sc, NM_PBUFFER_WMARK, sc->pbuf + sc->pwmark, 4);

                nm_ackint(sc, sc->playint);

                if (sc->pintr)
                        (*sc->pintr)(sc->parg);

                rv = 1;
        }
        if (status & sc->recint) {
                status &= ~sc->recint;

                sc->rwmark += sc->rblksize;
                sc->rwmark %= sc->rbufsize;

                nm_ackint(sc, sc->recint);
                if (sc->rintr)
                        (*sc->rintr)(sc->rarg);

                rv = 1;
        }
        if (status & sc->misc1int) {
                status &= ~sc->misc1int;
                nm_ackint(sc, sc->misc1int);
                x = nm_rd(sc, 0x400, 1);
                nm_wr(sc, 0x400, x | 2, 1);
                printf("%s: misc int 1\n", sc->dev.dv_xname);
                rv = 1;
        }
        if (status & sc->misc2int) {
                status &= ~sc->misc2int;
                nm_ackint(sc, sc->misc2int);
                x = nm_rd(sc, 0x400, 1);
                nm_wr(sc, 0x400, x & ~2, 1);
                printf("%s: misc int 2\n", sc->dev.dv_xname);
                rv = 1;
        }
        if (status) {
                status &= ~sc->misc2int;
                nm_ackint(sc, sc->misc2int);
                printf("%s: unknown int\n", sc->dev.dv_xname);
                rv = 1;
        }

        return (rv);
}


How does such such a thing ever happen? Who writes into the card's
NM_INT_REG register and how can an "unknown" value ever get there?

In other cases, the machine boots and everything works, except that

neo0 at pci1 dev 0 function 1 "Neomagic MagicMedia 256AV" rev 0x20
1:0:1 10c8:8005 pin B clink 0x01 irq 10 stage 0  WARNING: preserving irq 10
pci_intr_route_link: route PIRQ 0x01 -> IRQ 10 preserved BIOS setting
: irq 10
ac97: codec id not read
audio0 at neo0

and I am unable to use any audio. The sound stuff doesn't even
appear in sysctl -a.

Does anybody have the same problem, or even a solution?

        Thanks

                Jan

Reply via email to