NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

re: kern/46791: eso(4) kernel panic while booting -current



The following reply was made to PR kern/46791; it has been noted by GNATS.

From: matthew green <mrg%eterna.com.au@localhost>
To: gnats-bugs%NetBSD.org@localhost, gson%gson.org@localhost
Cc: kern-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,
    netbsd-bugs%netbsd.org@localhost
Subject: re: kern/46791: eso(4) kernel panic while booting -current
Date: Sun, 12 Aug 2012 05:20:45 +1000

 can you try this untested patch?  thanks.
 
 .mrg.
 
 
 Index: sys/dev/pci/eso.c
 ===================================================================
 RCS file: /cvsroot/src/sys/dev/pci/eso.c,v
 retrieving revision 1.60
 diff -p -r1.60 eso.c
 *** sys/dev/pci/eso.c  15 May 2012 18:11:28 -0000      1.60
 --- sys/dev/pci/eso.c  11 Aug 2012 19:19:53 -0000
 *************** eso_attach(device_t parent, device_t sel
 *** 267,272 ****
 --- 267,275 ----
        pa = aux;
        aprint_naive(": Audio controller\n");
   
 +      mutex_init(&sc->sc_lock, MUTEX_DEFAULT, IPL_NONE);
 +      mutex_init(&sc->sc_intr_lock, MUTEX_DEFAULT, IPL_AUDIO);
 + 
        sc->sc_revision = PCI_REVISION(pa->pa_class);
        aprint_normal(": ESS Solo-1 PCI AudioDrive ");
        if (sc->sc_revision <
 *************** eso_attach(device_t parent, device_t sel
 *** 329,334 ****
 --- 332,339 ----
            ESO_IO_IRQCTL_A1IRQ | ESO_IO_IRQCTL_A2IRQ | ESO_IO_IRQCTL_HVIRQ |
            ESO_IO_IRQCTL_MPUIRQ);
   
 +      mutex_spin_enter(&sc->sc_intr_lock);
 + 
        /* Set up A1's sample rate generator for new-style parameters. */
        a2mode = eso_read_mixreg(sc, ESO_MIXREG_A2MODE);
        a2mode |= ESO_MIXREG_A2MODE_NEWA1 | ESO_MIXREG_A2MODE_ASYNC;
 *************** eso_attach(device_t parent, device_t sel
 *** 340,345 ****
 --- 345,352 ----
        mvctl |= ESO_MIXREG_MVCTL_HVIRQM;
        eso_write_mixreg(sc, ESO_MIXREG_MVCTL, mvctl);
   
 +      mutex_spin_exit(&sc->sc_intr_lock);
 + 
        /* Set mixer regs to something reasonable, needs work. */
        sc->sc_recmon = sc->sc_spatializer = sc->sc_mvmute = 0;
        eso_set_monooutsrc(sc, ESO_MIXREG_MPM_MOMUTE);
 *************** eso_attach(device_t parent, device_t sel
 *** 381,389 ****
                return;
        }
   
 -      mutex_init(&sc->sc_lock, MUTEX_DEFAULT, IPL_NONE);
 -      mutex_init(&sc->sc_intr_lock, MUTEX_DEFAULT, IPL_AUDIO);
 - 
        intrstring = pci_intr_string(pa->pa_pc, ih);
        sc->sc_ih  = pci_intr_establish(pa->pa_pc, ih, IPL_AUDIO, eso_intr, sc);
        if (sc->sc_ih == NULL) {
 --- 388,393 ----
 


Home | Main Index | Thread Index | Old Index