[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <A2CA0424C0A6F04399FB9E1CD98E03048450126C@US01WEMBX2.internal.synopsys.com>
Date: Sat, 13 Dec 2014 23:51:41 +0000
From: Paul Zimmerman <Paul.Zimmerman@...opsys.com>
To: sundeep subbaraya <sundeep.lkml@...il.com>,
"balbi@...com" <balbi@...com>
CC: "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: query on DWC3
> From: linux-usb-owner@...r.kernel.org [mailto:linux-usb-owner@...r.kernel.org] On Behalf Of sundeep subbaraya
> Sent: Friday, December 12, 2014 9:13 PM
>
> Hi Felipe,
>
> In DWC3 driver, for three stage Control OUT transfer there is a check:
>
> else if (!IS_ALIGNED(req->request.length, dep->endpoint.maxpacket)
>
> && (dep->number == 0)) {.
> }
>
> I understand that we check for alignment of sizes and if not we
> prepare trb with maxpacket and enable interrupt on short packet. In
> databook I could not find anything related to this, it talks only
> about addresses should be aligned. In Control transfer programming
> model there is no difference between Control OUT or IN transfer, if
> three stage transfer - prepare trb with length wLength. Initially I
> followed this and not able to receive data on EP0 OUT.:( .After adding
> the above check it is working. Please help me to understand why we do
> this?
Hi Sundeep,
Please see section 8.2.3.3 "Buffer Size Rules and Zero-Length Packets"
in the databook:
For OUT endpoints, the following rules apply:
- The total size of a Buffer Descriptor must be a multiple of
MaxPacketSize
The wording may be a little confusing, it actually means that the size
of the data buffer for OUT endpoints must be a multiple of MaxPacketSize.
Section 8.2.5 states it more clearly:
- An OUT transfer’s transfer size (Total TRB buffer allocation)
must be a multiple of MaxPacketSize even if software is expecting
a fixed non-multiple of MaxPacketSize transfer from the Host.
This rule applies to all OUT endpoint types, including Control endpoints.
--
Paul
Powered by blists - more mailing lists