RE: [PATCH] usb: dwc3: ep0: Handle variable-length Data Stage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?

> 
> The problem here sounds like the Configuration descriptor for this
> particular device is exactly 128 bytes (two packets at HS), so a 0-

Exactly!

> length
> packet is needed to terminate the transfer.

--
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




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux