hi Mathias: 2014-06-24 16:38 GMT+08:00 Mathias Nyman <mathias.nyman@xxxxxxxxxxxxxxx>: > 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 did "Missed Service Error occurs" you mean is when we cannot find match ep_dequeue_seg which contain event_buffer? like the below code in handle_tx_event: if (!event_seg) { ....................... } > 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." > appreciate your help, -- 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