Re: ehci frame index goes backwards?

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

 



On Wed, 24 Oct 2018, Steve Calfee wrote:

> On Wed, Oct 24, 2018 at 9:48 AM Daniel Goertzen
> <daniel.goertzen@xxxxxxxxx> wrote:
> >
> > I am developing a custom USB device that makes use of isochronous IN
> > transfers.  It works fine from my laptop (xHCI) however on an embedded
> > target (vortex86dx3, EHCI) I am seeing mysterious EFBIG errors.  After
> > adding lots of debug to ehci-sched I discovered that the EHCI register
> > "FRINDEX" which is supposed to increase monotonically, is actually
> > taking a jump backwards:
> It does increment monotonically, but not forever. There is a limit
> defined by the ehci spec.
> 
> <quote ehci-specification-for-usb.pdf>
> Frame Index. The value in this register increments at the end of each
> time frame (e.g.
> micro-frame). Bits [N:3] are used for the Frame List current index.
> This means that each
> location of the frame list is accessed 8 times (frames or
> micro-frames) before moving to
> the next index. The following illustrates values of N based on the
> value of the Frame List
> Size field in the USBCMD register.
> </quote>
> 
> 10, 11 or 12 bits is the N size. This becomes the SOF number. It does
> wrap, maybe you are seeing a reading after a wrap?

The value won't wrap from 12318 to 12292 (the values reported by 
Daniel).  In fact, it won't wrap until it gets above at least 16383, 
since values that high are required for calculating the SOF number.

Alan Stern




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

  Powered by Linux