|
From: Johannes S. <js...@si...> - 2012-01-17 19:22:56
|
On Tue, Jan 17, 2012 at 11:42:45AM -0500, Alan Stern wrote: > On Tue, 17 Jan 2012, Johannes Stezenbach wrote: > > > On Tue, Jan 17, 2012 at 10:42:53AM -0500, Alan Stern wrote: > > > On Tue, 17 Jan 2012, Johannes Stezenbach wrote: > > > > > > > > Among other things, SET_CONFIGURATION resets the data toggle of > > > > the endpoint to DATA0. > > > > > > Why would anybody want to do that? Isn't it easier and simpler just to > > > keep using the endpoint's current data toggle value? > > > > USB spec section 9.1.1.5 "Configured" requires it. > > You misunderstood. I wasn't asking why you would want to put the > device into the Configured state; I was asking why you would want to > reset the endpoint's data toggle. That's what I mean, 9.1.1.5 requires the data toggle reset when setting the configuration. > Although, come to think of it, why _would_ you want to put the device > into the Configured state? The only reason I can think of would be if > the operating system didn't already take care of that for you. It doesn't matter who calls SET_CONFIGURATION, what matters is that HCD and device agree, otherwise the HCD will signal an error. I mention it because I spent some time debugging FX2 firmware and this was one of the issues causing mysterious error returns. However, my device is self powered, if the device is bus powered and the configuration is set once after plug-in by the OS then you'll never see this issue. Johannes |