On Wed, 28 Jul 2010, Hans Petter Selasky wrote: > I grepped the EHCI specification for the word short, and in section 3.5.2 it > says about the alternate next pointer that this will alaways be used when a > short packet is received. If the alternate next pointer is set to the > terminate value, shouldn't the QH be retired aswell? No. When "using" the altnext pointer, the first thing the controller does is check the Terminate bit. If that bit is set, the controller ignores the altnext field and uses the regular "next" pointer instead. >From section 4.10.2: If the field Bytes to Transfer is not zero and the T-bit in the Alternate Next qTD Pointer is set to zero, then the host controller uses the Alternate Next qTD Pointer. Otherwise, the host controller uses the Next qTD Pointer. If Next qTD Pointer's T-bit is set to a one, then the host controller exits this state and uses the horizontal pointer to the next schedule data structure. By making altnext point to an inactive qTD, you can force the queue to stop: Using the selected pointer the host controller fetches the referenced qTD. If the fetched qTD has its Active bit set to a one, the host controller moves the pointer value used to reach the qTD (Next or Alternate Next) to the Current qTD Pointer field, then performs the overlay. If the fetched qTD has its Active bit set to a zero, the host controller aborts the queue advance and follows the queue head's horizontal pointer to the next schedule data structure. > Is a ZLP not regarded a short packet? It is. That's not the issue; you didn't understand what the spec meant when it said the pointer was "used". > If your view is correct, than you cannot setup more than 16K of TD's when > doing mass storage, risking that on IN transactions the Command Status Wrapper > block will get part of the data buffer. Not at all. You can set up as much as you like. Just make sure that in all the qTD's except possibly the last, the altnext field points to a qTD that has the Active bit clear and the Halted bit set. (Some controllers disobey the spec and perform the overlay even when Active is clear.) Alan Stern -- 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