I thought that you might have had the others, but wasn't sure.
Control, Bulk, Interrupt, and ISO transfers all happen on different Pipes. i.e.: each should have its own endpoint, while each (usually and not counting the control pipe) having a separate endpoint for direction. Therefore, the toggle bit for Control transfers has no influence on the toggle bit for bulk transfers. Each endpoint must maintain its own toggle bit.
As far as this toggle bit is concerned, you *must* have it correct when sent down the wire, so to speak. For example with control transfers, you can and may place the SETUP packet, zero or more DATA packets, and the STATUS packet in different queues, in different frames, etc, however the sequence sent down the wire must have the toggle bits correct.
The SETUP packet *must* have the toggle bit clear.
The first DATA packet *must* have the toggle bit set.
The second DATA packet *must* have the toggle bit clear.
. . .
The STATUS packet *must* have the toggle bit set.
No matter where you place these packets within your schedule (frame number, queue number, etc), the sequence *must* be SETUP/zero or more DATA/STATUS and the toggle bits must be correct.
If you do place these packets in different queues and frames, (which in my opinion is not something you want to do), you must take great care in knowing where the controller is within this schedule so that it does not execute one of the DATA packets before the SETUP packet.
In my opinion, you should place the SETUP packet and all DATA packets (if any) (and the STATUS packet if you wish) in the same queue. This way, if the controller is processing that particular queue and runs out of time before it can execute all of the DATA packets, you are guaranteed that the controller will start with the next unexecuted packet, following the correct sequence, the next time it comes around to this queue. i.e.: The controller is guaranteed not to execute any packets further down the queue (in the vertical direction) until all of the packets before it within this queue are executed. (granted you have not pointed any other queue or TD to any object within this queue).
An advantage to this is the Depth/Breadth bit and short packet detection. If you create a queue and point the Vertical pointer to a SETUP packet and enough DATA packets to transfer the data expected, then point the Queue's Horizontal pointer to a single TD holding the STATUS packet, if one of the DATA packets is a "short packet" (spd bit set), it will stop executing in the depth direction (depth bit set) and execute in the Breadth position.
For example, if you expect up to 255 bytes from the Configuration Descriptor, place a SETUP packet, and 32 DATA packets in the Vertical direction part of the queue (setting the Depth First bit) and a single STATUS packet in the Horizontal direction of the queue. The controller will try to execute all 32 DATA packets until it finds a Short Packet Detect. It will stop in the Depth direction and move to the Horizontal pointer, which is now your STATUS packet. This allows the controller to handle short packets, not your driver. Let the controller do the work.
This is just my opinion, but all single transfers (called TDs in the USB specs and later controller specs) should be in one queue, as far as the UHCI is concerned.
I am guessing that you are getting the STALL because the controller executed the SETUP packet, then either found a DATA packet out of sequence, the STATUS packet, or the same or different SETUP packet again. Remember, the control pipe expects SETUP/zero or more DATA/STATUS in sequence. It cannot handle multiple transfers at the same time. It must be SETUP/DATAx/STATUS.
Hope this helps.
Ben
-
http://www.fysnet.net/the_universal_serial_bus.htm