* Tony Lindgren <t...@atomide.com> [170113 08:27]:
> @@ -316,11 +318,12 @@ static irqreturn_t cppi41_irq(int irq, void *data)
>                       __iormb();
>  
>               while (val) {
> +                     unsigned long flags;
>                       u32 desc, len;
>                       int error;
>  
>                       error = pm_runtime_get(cdd->ddev.dev);
> -                     if (error < 0)
> +                     if ((error != -EINPROGRESS) && error < 0)
>                               dev_err(cdd->ddev.dev, "%s pm runtime get: 
> %i\n",
>                                       __func__, error);
>  
> @@ -340,6 +343,11 @@ static irqreturn_t cppi41_irq(int irq, void *data)
>                       else
>                               len = pd_trans_len(c->desc->pd0);
>  
> +                     /* This warning should never trigger */
> +                     spin_lock_irqsave(&cdd->lock, flags);
> +                     WARN_ON(cdd->is_suspended);
> +                     spin_unlock_irqrestore(&cdd->lock, flags);
> +
>                       c->residue = pd_trans_len(c->desc->pd6) - len;
>                       dma_cookie_complete(&c->txd);
>                       dmaengine_desc_get_callback_invoke(&c->txd, NULL);

Hmm this check needs to be before cppi41_pop_desc() already as that does
cppi_readl(). And the spinlocks here don't help anything, we just want
to see a warning if we hit a bug somewhere else.

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to