On Wed, 25 Jun 2014, Stalley, Sean wrote: > > -----Original Message----- > > From: Alan Stern [mailto:[email protected]] > > Sent: Wednesday, June 25, 2014 11:46 AM > > To: Stalley, Sean > > Cc: [email protected]; Ismail, Abdul R > > Subject: Re: [PATCH] Change wMaxPacketSize default value for Full Speed EP0 > > > > On Wed, 25 Jun 2014, Sean O. Stalley wrote: > > > > > From: "Sean O. Stalley" <[email protected]> > > > > > > Change the default wMaxPacketSize value for EP0 of Full Speed devices > > > from the maximum possible size (64) to the minimum (8). > > > All full speed devices support a packet size of 8, but not all support > > > a size of 64. > > > > You don't seem to understand what you are saying. Supporting a packet size > > of > > 8 is very different from having a maxpacket size of 8. > > I suppose I could have phrased that better. What I meant to say was: I do not > understand why one would make the default wMaxPacketSize for EP0 of a full > speed device 64. > To me, making the default 8 makes more sense.
Neither 8 nor 64 is the default. 64 is merely the initial value; it gets updated later when we read the correct value from the device. 8 won't work with the "new" initialization scheme. Consider what the scheme does: It sends a Get-Device-Descriptor request with a transfer length of 64. Since the descriptor is only 18 bytes long, the device will try to send back an 18-byte reply. If the actual maxpacket size is 64, the device will do this by sending the entire reply in a single 18-byte packet. But if we set the initial maxpacket value in the host controller to 8, the reply would fail with a Babble error because 18 > 8. > > > No packet longer than 8 bytes is ever read from EP0 before this value > > > is changed from the default. > > > > That is not true. > > You are right, that statement is only true when using the old scheme. > Would setting wMaxPacketSize conditionally (based on using the old/new > scheme) be preferred? Well, it would work. But it wouldn't be preferred. Why go to the extra trouble? It's easier to set the initial value to 64 always. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
