Re: [PATCH 60/62] usb: dwc3: gadget: disable XFER_NOT_READY

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

 



John Youn <John.Youn@xxxxxxxxxxxx> writes:
> On 5/30/2016 4:46 AM, Felipe Balbi wrote:
>> We don't need this IRQ anymore.
>> 
>> Signed-off-by: Felipe Balbi <felipe.balbi@xxxxxxxxxxxxxxx>
>> ---
>>  drivers/usb/dwc3/gadget.c | 6 ++++--
>>  1 file changed, 4 insertions(+), 2 deletions(-)
>> 
>> diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
>> index 7a0c787cecdd..613dde9fb538 100644
>> --- a/drivers/usb/dwc3/gadget.c
>> +++ b/drivers/usb/dwc3/gadget.c
>> @@ -463,8 +463,10 @@ static int dwc3_gadget_set_ep_config(struct dwc3 *dwc, struct dwc3_ep *dep,
>>  		params.param2 |= dep->saved_state;
>>  	}
>>  
>> -	params.param1 = DWC3_DEPCFG_XFER_COMPLETE_EN
>> -		| DWC3_DEPCFG_XFER_NOT_READY_EN;
>> +	params.param1 = DWC3_DEPCFG_XFER_COMPLETE_EN;
>> +
>> +	if (dep->number <= 1)
>> +		params.param1 |= DWC3_DEPCFG_XFER_NOT_READY_EN;
>>  
>>  	if (usb_ss_max_streams(comp_desc) && usb_endpoint_xfer_bulk(desc)) {
>>  		params.param1 |= DWC3_DEPCFG_STREAM_CAPABLE
>> 
>
> Still needed for ISOC too.

indeed. Here's updated version:

8<--------------------------------------------------------------------
commit 8edf6e7f68878d31fda351981acac01097712f49
Author: Felipe Balbi <felipe.balbi@xxxxxxxxxxxxxxx>
Date:   Mon May 30 13:40:00 2016 +0300

    usb: dwc3: gadget: disable XFER_NOT_READY
    
    We don't need this IRQ anymore for interrupt or bulk
    endpoints.
    
    Signed-off-by: Felipe Balbi <felipe.balbi@xxxxxxxxxxxxxxx>

diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index d16290457a8d..8673874de191 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -463,8 +463,10 @@ static int dwc3_gadget_set_ep_config(struct dwc3 *dwc, struct dwc3_ep *dep,
 		params.param2 |= dep->saved_state;
 	}
 
-	params.param1 = DWC3_DEPCFG_XFER_COMPLETE_EN
-		| DWC3_DEPCFG_XFER_NOT_READY_EN;
+	params.param1 = DWC3_DEPCFG_XFER_COMPLETE_EN;
+
+	if (dep->number <= 1 || usb_endpoint_xfer_isoc(desc))
+		params.param1 |= DWC3_DEPCFG_XFER_NOT_READY_EN;
 
 	if (usb_ss_max_streams(comp_desc) && usb_endpoint_xfer_bulk(desc)) {
 		params.param1 |= DWC3_DEPCFG_STREAM_CAPABLE


-- 
balbi

Attachment: signature.asc
Description: PGP signature


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

  Powered by Linux