On Wed, 20 Sep 2006, Harald Welte wrote: > Hi, Alan (still remember meeting you at OLS in one of the past years!)
Hi! > > Your assumption is wrong. > > thanks for your quick response. > > > When a control-out transfer takes, the host controller sends a SETUP > > packet followed by as many OUT/DATA packets as necessary to transfer the > > data, but no zero-length OUT/DATA. There is a zero-length IN packet to > > terminate the transfer (the "status stage"), but that's present regardless > > of the amount of data. > > This really solves my problem. One fundamental problem (at least given > the SAM7 register set) remains: I have no indication to decide which of > the data OUT packets was the last, and when the device should return the > status stage IN packet. The IN packet is sent by the host to mark the end of the data stage. The device then is supposed to return a zero-length DATA1 packet, to acknowledge the end of the transfer. So the device knows the data is complete when it gets that IN packet. > Since (at least in my application, don't know whether this is how it is > supposed to work) the setup state states the length of the data, I > simply use this as indication. Yes, that will work equally well. > Seems to work just fine now. I spent already more than one day at this > problem ;( Thanks once again. You're welcome. Alan Stern ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel