From: Marek Vasut Date: Fri, 25 Nov 2016 19:25:18 +0100 Subject: [U-Boot] [PATCH] usb: xhci: Limit transfer length in a single TD In-Reply-To: <5a37e3b0-949a-890f-bbee-94a543883ac2@samsung.com> References: <1479356515-12375-1-git-send-email-dwoo08.lee@samsung.com> <1dbd9fa8-cdf8-2a69-7187-35980617a4ea@samsung.com> <19a81b67-282b-5583-81ef-8bec8efc0ec4@denx.de> <5a37e3b0-949a-890f-bbee-94a543883ac2@samsung.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 11/22/2016 03:42 AM, Dongwoo Lee wrote: > On 2016? 11? 18? 23:01, Marek Vasut wrote: >> On 11/18/2016 08:24 AM, Jaehoon Chung wrote: >>> Hi, >>> >>> Added Marek as USB maintainer. >>> >>> On 11/17/2016 01:21 PM, Dongwoo Lee wrote: >>>> The transfer request exceeding 4032KB (the maximum number of TRBs per >>>> TD * the maximum size of transfer buffer on TRB) fails on xhci host >>>> with timed out error or babble error state. This failure occurs when >>>> accessing large files on USB mass-storage. Currently with xhci as well >>>> as ehci host, the driver requests maximum 30MB (65536 blks * 512 byte) >>>> to storage at once. However, xhci cannot handle this request because >>>> of the reason mentioned above, even though ehci can handle this. Thus, >>>> transfer request larger than this size should be splitted in order to >>>> limit the length of data in a single TD. >>>> >>>> Even though the single request is splitted into multiple requests, >>>> the transfer speed has affected insignificantly in comparison with >>>> ehci host: 22.6 MB/s on ehci and 22.3 MB/s on xhci for 100MB tranfer. >>> >>> I don't have USB knowledge..So i wonder that this is correct way. >>> Have other guys ever seen the similar issue? >> >> Is this a controller limitation ? >> >> btw can you fix your mailer to NOT send HTML email to the list? >> > > If my understanding for xhci spec.(rev. 1.1) 4.9.2 is right, the controller > has no limitation for transfer size because it can support a very large TRB > ring with multiple Ring Segments. > > However, the xhci driver seems not to be implemented for supporting it; > the TRB ring is comprised of only a single segment. As a result, it cannot > handle the request exceeding 4032KB (TRB_MAX_BUFF_SIZE(64KB) * > (TRBS_PER_SEGMENT(64) - link TRB(1)), thus the request should be divided. Can we update the driver ? > This issue can be reproduced by using the following command on Odroid-XU3/XU4 > with USB mass-storage connected to xhci host: > > >fatload usb 0 40800000 {a file exceeding 4032KB} > > About HTML email, I just mailed with git-send-email, but I will double-check > the setting. OK -- Best regards, Marek Vasut