Hi,

> > > > On Thu, Dec 19, 2013 at 11:32:08AM +0900, Anton Tikhomirov wrote:
> > > > > Hi,
> > > > >
> > > > > > Hi,
> > > > > >
> > > > > > On Tue, Dec 17, 2013 at 03:59:31PM +0900, Anton Tikhomirov
> wrote:
> > > > > > > In accordance with specification, when sent data length is
> > > > > >
> > > > > > please mention section of specification.
> > > > >
> > > > > USB2.0 spec., 8.5.3.2 Variable-length Data Stage
> > > > >
> > > > > >
> > > > > > > an exact multiple of wMaxPacketSize for the pipe and less
> > > > > > > than requested by host, the function shall return a zero-
> length
> > > > > > > packet (ZLP) to indicate the end of the Data stage to a USB
> host.
> > > > > >
> > > > > > hmm... so in USB3 mode that would be host requesting 513
> bytes and us
> > > > > > sending only 512.
> > > > >
> > > > > Our customer reported this issue. In their case, Windows USB2.0
> host
> > > > > requests Configuration descriptor with wLength = 255. Device
> replies
> > > > > with two 64 bytes IN transactions, and stalls EP0 on 3rd IN
> transaction,
> > > > > where it has to reply with ZLP. Unfortunately, we don’t have
> full
> > > > > picture of what's happening on their side and why host requests
> > > > > more bytes than actual length of Configuration descriptor.
> > > >
> > > > that's a bug on the host side.
> > >
> > > Certainly not. The host doesn't know how big the Configuration
> descriptor
> > > is, so it always asks for 255 bytes (on Windows that is, I'm not
> sure
> > > about Linux).
> >
> > As far as I know, first time Windows host requests only 9 bytes of
> > Configuration descriptor, which include total size of Configuration
> > descriptor and its subordinates. Then, second time it requests
> > Configuration descriptor again and uses total length obtained in
> first
> > step. Am I wrong?
> 
> I think it does that for the Device descriptor, but not the
> Configuration
> descriptor, for some reason. It could depend on which version of
> Windows
> you have, too.
> 
> My point was that it is not a bug for the host to ask for more bytes
> than
> the length of the descriptor, just as it is not a bug to ask for fewer
> bytes than the length of the descriptor. The device must handle both
> cases.

Agree.

Thanks

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to