• David Brownell's avatar
    [PATCH] USB: SMP ehci-q.c 1010 BUG() · aba85312
    David Brownell authored
    Stefano Barbato wrote:
    > Dual PIII
    > kernel 2.4.21-rc2 (w/ SMP)  (2.5.69 below)
    > ...
    >
    > I put a few printk before the BUG() and I found that the offending if() is
    > this:
    >         if(qh->qh_state != QH_STATE_LINKED
    >                                 && qh->qh_state != QH_STATE_UNLINK_WAIT)
    >
    > because qh_state were QH_STATE_COMPLETING.
    
    I got a similar SMP report recently, but without info about
    which clause was failing -- which is a key clue, thanks!!
    
    The COMPLETING state is used only while a QH is being
    scanned for completed TDs.  (Think CPU-0 irq handler.)
    Looking at the handful of places that call the routine
    reporting the BUG(), a couple seem like they could make
    trouble with multiple CPUs in the driver.
    aba85312
ehci-q.c 28.9 KB