David Brownell wrote:
Though I suspect that in reality these two distinct interrupts will often coalesce as well as DATA1 token should follow IN/OUT pretty quick. What a racy piece of hardware... :-/
Nothing very specific to this hardware, unless it's really doing something stupid like issuing IRQs for IN/OUT instead of just the various flavors of DATA.
Well, it does issue SetupEnd interrupt on receiving IN/OUT token -- if they are unexpected ATM. That's off the top of my head.
Control transfers *always* have lots of adjacent packets of odd types, so unless the hardware takes particular care to let the software insert delays between e.g.
- SETUP/DATA then * IN/DATA (most allow NAKing here) * OUT/DATA (some don't, painful) - IN/DATA and status OUT/DATA - OUT/DATA and status IN/DATA
then there will be races there. And delivery of SETUP is inherently racey ... in the worst case, the host sends one before the preceding transaction completes.
That is already handled.
A common case that's not quite as bad is getting a SETUP right after the empty status ack was sent.
Handled too, however I haven't seen this happening so far: there are always at least 2 distinct interrupts between the last data packet sent by device and SETUP received -- can be all spec'ed 3 interrupts sometimes as it turned out.
- Dave
WBR, Sergei -- 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