Re: [PATCH 2/2] usb: dwc2: gadget: Accept LPM token when TxFIFO is not empty

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

 



Hi Sergei,

On 10/30/2018 19:02, Sergei Shtylyov wrote:
> Hello!
> 
> On 10/30/2018 03:26 PM, Artur Petrosyan wrote:
> 
>> To accept LPM token during ISOC transfers when TxFIFO
>> is not empty.
>>
>> Signed-off-by: Artur Petrosyan <arturp@xxxxxxxxxxxx>
>> Signed-off-by: Minas Harutyunyan <hminas@xxxxxxxxxxxx>
>> ---
>>   drivers/usb/dwc2/gadget.c | 1 +
>>   drivers/usb/dwc2/hw.h     | 3 +++
>>   2 files changed, 4 insertions(+)
>>
>> diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
>> index 6bd4054e894d..63d53619fd21 100644
>> --- a/drivers/usb/dwc2/gadget.c
>> +++ b/drivers/usb/dwc2/gadget.c
>> @@ -5026,6 +5026,7 @@ void dwc2_gadget_init_lpm(struct dwc2_hsotg *hsotg)
>>   	val |= hsotg->params.lpm_clock_gating ? GLPMCFG_ENBLSLPM : 0;
>>   	val |= hsotg->params.hird_threshold << GLPMCFG_HIRD_THRES_SHIFT;
>>   	val |= hsotg->params.besl ? GLPMCFG_ENBESL : 0;
>> +	val |= GLPMCFG_RETRY_CNT_1;
>>   	dwc2_writel(hsotg, val, GLPMCFG);
>>   	dev_dbg(hsotg->dev, "GLPMCFG=0x%08x\n", dwc2_readl(hsotg, GLPMCFG));
>>   
>> diff --git a/drivers/usb/dwc2/hw.h b/drivers/usb/dwc2/hw.h
>> index 2b1ea441b7d4..84d2b32f4831 100644
>> --- a/drivers/usb/dwc2/hw.h
>> +++ b/drivers/usb/dwc2/hw.h
>> @@ -333,6 +333,9 @@
>>   #define GLPMCFG_SNDLPM			BIT(24)
>>   #define GLPMCFG_RETRY_CNT_MASK		(0x7 << 21)
>>   #define GLPMCFG_RETRY_CNT_SHIFT		21
>> +#define GLPMCFG_RETRY_CNT_0		21
>> +#define GLPMCFG_RETRY_CNT_1		22
>> +#define GLPMCFG_RETRY_CNT_2		23
> 
>     Not '(0|1|2 << 21)'?
> 
> [...]
> 
> MBR, Sergei
> 

Thank you very much for your review. I will submit V2 patches to fix bit 
definitions,and also add Reviewed-by tag.

Regards,
Artur




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

  Powered by Linux