RE: Question about calculate trbs in xhci

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

 



From: Paul Zimmerman
...
> > The xhi hardware doesn't have that constraint, but has the different constraints:
> > 1) A buffer must not cross a 64k address boundary.
> > 2) A LINK TRB (at the end of the ring) must only occur at a USB message boundary
> >    (actually it is a slightly tighter constraint).
> > In combination those two are a PITA.
> 
> Hi David,
> 
> May I ask where in the xHCI spec is 2) stated? I'm not finding it
> (looking at "Revision 1.0 with errata to 7/12/12").
> 
> I can't find "message boundary" anywhere in the spec. Did you mean packet
> boundary?

Yes... the ones that are 1kB for USB3
I can't remember what every protocol calls each data unit :-)

> If so, there is some text in the spec which contradicts that. In 4.11.7.1,
> it says:
> 
> "In Figure 26 the IOC flag only may be set in TRBs 5 and 10 ...
>  Note that THE LINK TRB DOES NOT LAND ON A PACKET BOUNDARY relative
>  to the start of TD Fragment 1, so its IOC flag may not be set."

Understanding section 4.11.7.1 is the problem here.

It talks about the 'Max Burst Payload' (MBP) which is actually set to 16 packets (16kB).
Ignore the references to IOB and status TRBs, the issue is the second bullet point
on the first list 'A TD fragment shall not span Transfer Ring Segments'.

In effect this means that a TD fragment will terminate at a LINK TRB and a new
TD fragment will start in the new ring.

Which is (more or less) equivalent to saying that the 'Chain bit' is ignored on
the last TRB in the ring (for bulk data).

So a link TRB must occur on a packet boundary in order for the target to
treat the following TD fragment as part of the same bulk data message.

	David

��.n��������+%������w��{.n�����{���)��jg��������ݢj����G�������j:+v���w�m������w�������h�����٥





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

  Powered by Linux