Re: [PATCH 13/30] usb: dwc2: gadget: Fixes for StsPhseRcvd interrupt

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

 



On 11/8/2016 1:25 AM, Felipe Balbi wrote:
> 
> Hi,
> 
> John Youn <johnyoun@xxxxxxxxxxxx> writes:
>> From: Vahram Aharonyan <vahrama@xxxxxxxxxxxx>
>>
>> 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 <vahrama@xxxxxxxxxxxx>
>> Signed-off-by: John Youn <johnyoun@xxxxxxxxxxxx>
>> ---
>>  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?

I'm not sure. That looks like a mistake. We'll check.

Regards,
John


> 
>>  		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 majordomo@xxxxxxxxxxxxxxx
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux