Current-Users archive

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

re: ehci panic



can you try this?  my uvideo worked :-(


.mrg.

Index: ehci.c
===================================================================
RCS file: /cvsroot/src/sys/dev/usb/ehci.c,v
retrieving revision 1.191
diff -p -r1.191 ehci.c
*** ehci.c      19 Jun 2012 07:15:41 -0000      1.191
--- ehci.c      21 Jun 2012 09:55:41 -0000
*************** ehci_alloc_itd(ehci_softc_t *sc)
*** 2892,2898 ****
        int i, offs, frindex, previndex;
        usb_dma_t dma;
  
!       KASSERT(mutex_owned(&sc->sc_lock));
  
        /* Find an itd that wasn't freed this frame or last frame. This can
         * discard itds that were freed before frindex wrapped around
--- 2892,2898 ----
        int i, offs, frindex, previndex;
        usb_dma_t dma;
  
!       mutex_lock(&sc->sc_lock);
  
        /* Find an itd that wasn't freed this frame or last frame. This can
         * discard itds that were freed before frindex wrapped around
*************** ehci_alloc_itd(ehci_softc_t *sc)
*** 2918,2923 ****
--- 2918,2924 ----
  
                if (err) {
                        DPRINTF(("ehci_alloc_itd, alloc returned %d\n", err));
+                       mutex_unlock(&sc->sc_lock);
                        return NULL;
                }
  
*************** ehci_alloc_itd(ehci_softc_t *sc)
*** 2944,2949 ****
--- 2945,2952 ----
        itd->xfer_next = NULL;
        itd->slot = 0;
  
+       mutex_unlock(&sc->sc_lock);
+ 
        return itd;
  }
  


Home | Main Index | Thread Index | Old Index