> From: Matthijs Kooijman [mailto:matth...@stdin.nl]
> Sent: Monday, April 15, 2013 7:14 AM
> 
> Before, enabling common interrupts would implicitly disable all other
> interrupts and enabling host interrupts would disable all interrupts and
> then enable both common and host interrupts.
> 
> Now, these two are properly separated: each enable function only enables
> its own interrupts and leaves all others alone. This makes the
> functions do what you'd expect them to.
> 
> In practice, both of these functions are only called together during
> initialization and cleanup, so there shouldn't be any behaviour change
> (though some timing changes could occur).
> 
> Signed-off-by: Matthijs Kooijman <matth...@stdin.nl>
> ---
>  drivers/staging/dwc2/core.c | 22 +++++++++-------------
>  1 file changed, 9 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/staging/dwc2/core.c b/drivers/staging/dwc2/core.c
> index 09b6d19..6b75821 100644
> --- a/drivers/staging/dwc2/core.c
> +++ b/drivers/staging/dwc2/core.c
> @@ -69,13 +69,13 @@ static void dwc2_enable_common_interrupts(struct 
> dwc2_hsotg *hsotg)
>       /* Clear any pending OTG Interrupts */
>       writel(0xffffffff, hsotg->regs + GOTGINT);
> 
> -     /* Clear any pending interrupts */
> -     writel(0xffffffff, hsotg->regs + GINTSTS);
> +     /* Clear any pending common interrupts */
> +     writel(GINTMSK_COMMON, hsotg->regs + GINTSTS);
> 
> -     /* Enable the interrupts in the GINTMSK */
> -     intmsk = GINTSTS_DISCONNINT | GINTSTS_MODEMIS | GINTSTS_OTGINT;
> -
> -     intmsk |= GINTSTS_CONIDSTSCHNG | GINTSTS_WKUPINT | GINTSTS_USBSUSP |
> +     /* Enable common interrupts without disturbing host mode interrupts */
> +     intmsk = readl(hsotg->regs + GINTMSK);
> +     intmsk |= GINTSTS_DISCONNINT | GINTSTS_MODEMIS | GINTSTS_OTGINT |
> +               GINTSTS_CONIDSTSCHNG | GINTSTS_WKUPINT | GINTSTS_USBSUSP |
>                 GINTSTS_SESSREQINT;

This should use the interrupt list that you just added in patch 8/10, right?

-- 
Paul

--
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