Re: [RFT/PATCH 18/38] usb: dwc3: gadget: check for Missed Isoc from event status

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

 



Hi,

On 4/10/2018 12:36 AM, Felipe Balbi wrote:
> 
> Hi,
> 
> Thinh Nguyen <Thinh.Nguyen@xxxxxxxxxxxx> writes:
>> Hi Felipe,
>>
>> On 4/9/2018 4:28 AM, Felipe Balbi wrote:
>>> In case we get an event with status set to Missed Isoc, this means we
>>> have missed an isochronous interval and should issue End Transfer
>>> command and wait for the following XferNotReady.
>>
>> Why does DWC3 need to issue End Transfer if there are still queued requests?
> 
> Without XferNotReady, we won't have a reliable way to know the uFrame
> number. Read the Isochronous programming sequence from your databook.

Right. We need XferNotReady to know when to start isoc transfer. But if 
there are still queued requests, DWC3 can just wait to see if any of 
them will succeed to continue with the transfer just as how DWC3 is 
handling it now. If we end and restart the transfer right away, then we 
may lose more isoc data than necessary (due to isoc scheduling at least 
4 uFrame ahead of time). Is there something you see that doesn't work 
with the current implementation?

> 
>>> @@ -2383,14 +2380,25 @@ static void dwc3_gadget_endpoint_transfer_in_progress(struct dwc3_ep *dep,
>>>    {
>>>    	struct dwc3		*dwc = dep->dwc;
>>>    	unsigned		status = 0;
>>> +	bool			stop = false;
>>>    
>>>    	dwc3_gadget_endpoint_frame_from_event(dep, event);
>>>    
>>>    	if (event->status & DEPEVT_STATUS_BUSERR)
>>>    		status = -ECONNRESET;
>>>    
>>> +	if (event->status & DEPEVT_STATUS_MISSED_ISOC) {
>>> +		status = -ECONNRESET;
>>
>> Missed isoc shouldn't cause this error status or if it should return an
>> error status at all. Maybe the status can be -EXDEV, similar to the host
>> side (/Documentation/driver-api/usb/error-codes.rst).
> 
> fair enough. I'll change to EXDEV
> 

BR,
Thinh

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