Hi,

John Youn <johny...@synopsys.com> writes:
> From: Vahram Aharonyan <vahr...@synopsys.com>
>
> Corrected unmasking of StsPhseRcvd interrupt not to be performed during
> gadget initialization if operating in Slave mode.
>
> Also moved StsPhsRcvd interrupt checking in endpoint interrupt handler
> to correspond HW databook register field sequence.
>
> Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com>
> Signed-off-by: John Youn <johny...@synopsys.com>
> ---
>  drivers/usb/dwc2/gadget.c | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
> index 2ca5779..e866edc 100644
> --- a/drivers/usb/dwc2/gadget.c
> +++ b/drivers/usb/dwc2/gadget.c
> @@ -2554,9 +2554,6 @@ static void dwc2_hsotg_epint(struct dwc2_hsotg *hsotg, 
> unsigned int idx,
>       if (idx == 0 && (ints & (DXEPINT_SETUP | DXEPINT_SETUP_RCVD)))
>               ints &= ~DXEPINT_XFERCOMPL;
>  
> -     if (ints & DXEPINT_STSPHSERCVD)
> -             dev_dbg(hsotg->dev, "%s: StsPhseRcvd asserted\n", __func__);
> -
>       if (ints & DXEPINT_XFERCOMPL) {
>               dev_dbg(hsotg->dev,
>                       "%s: XferCompl: DxEPCTL=0x%08x, DXEPTSIZ=%08x\n",
> @@ -2619,6 +2616,9 @@ static void dwc2_hsotg_epint(struct dwc2_hsotg *hsotg, 
> unsigned int idx,
>               }
>       }
>  
> +     if (ints & DXEPINT_STSPHSERCVD)
> +             dev_dbg(hsotg->dev, "%s: StsPhseRcvd\n", __func__);

I really don't get what's up with these interrupts that only print a
debugging message. Why do you even enable them? Why do you care? There's
nothing to be handled, apparently.

> @@ -2910,9 +2910,10 @@ void dwc2_hsotg_core_init_disconnected(struct 
> dwc2_hsotg *hsotg,
>  
>       /*
>        * don't need XferCompl, we get that from RXFIFO in slave mode. In
> -      * DMA mode we may need this.
> +      * DMA mode we may need this and StsPhseRcvd.
>        */
> -     dwc2_writel((using_dma(hsotg) ? (DIEPMSK_XFERCOMPLMSK) : 0) |
> +     dwc2_writel((using_dma(hsotg) ? (DIEPMSK_XFERCOMPLMSK |
> +             DOEPMSK_STSPHSERCVDMSK) : 0) |

Why is this bit is duplicated below?

>               DOEPMSK_EPDISBLDMSK | DOEPMSK_AHBERRMSK |
>               DOEPMSK_SETUPMSK | DOEPMSK_STSPHSERCVDMSK,
>               hsotg->regs + DOEPMSK);
> -- 
> 2.10.0
>
> --
> 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

-- 
balbi

Attachment: signature.asc
Description: PGP signature

Reply via email to