Re: some question about xhci skip_isoc_td

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

 



On 06/23/2014 03:44 PM, David Laight wrote:
> From: vichy
>> hi all:
>> when i trace xhci source, I found in skip_isoc_td, there is a
>> possibility to increase de-queue pointer twice.
>>
>> in skip_isoc_td:
>>       /* Update ring dequeue pointer */
>>         while (ep_ring->dequeue != td->last_trb)
>>                 inc_deq(xhci, ep_ring);
>>         inc_deq(xhci, ep_ring);
>>
>> why (ep_ring->dequeue != td->last_trb) we have to increase the dequeue pointer?
>> I try to find any description in spec about this but in vain.
>> is there any special reason to do so?
> 
> An isoc transfer can consist of a lot of TRB.
> The code wants to skip all of them.
> I suspect there are faster ways to achieve the same effect!
> 

As David says, the inc_dec() in the while loop will move the dequeue pointer to the last TRB of that TD.
The additional inc_deq() then moves it to the next TD, (or to enqueue if no more TDs are on the endpoint ring)

section 4.10.1 in xhci specification has some info on this:
 
"If a Missed Service Error occurs on
an intermediate TRB of a TD of an Isoch endpoint the xHC shall advance to the first TRB of the next TD or
the Enqueue Pointer (i.e.Cycle bit transition), whichever is encountered first, when continuing execution on
the Transfer Ring."

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