All of lore.kernel.org
 help / color / mirror / Atom feed
From: Terry Zhou <bjzhou@marvell.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [USB]USB2.0 device timeout issue.
Date: Mon, 15 May 2017 04:16:50 +0000	[thread overview]
Message-ID: <2a178e2f7bfc48d8844a937a722a646f@SC-EXCH04.marvell.com> (raw)

+ Nadav Haklai.

Best Regards,
Terry

From: Terry Zhou
Sent: 2017年5月11日 9:02
To: 'u-boot at lists.denx.de' <u-boot@lists.denx.de>; 'marex at denx.de' <marex@denx.de>
Cc: 'Stefan Roese' <sr@denx.de>; 'Simon Glass' <sjg@chromium.org>; 'marex at denx.de' <marex@denx.de>
Subject: [U-boot][USB]]USB2.0 device timeout issue.

+ Marek Vasut

Best Regards,
Terry

From: Terry Zhou
Sent: 2017年5月10日 15:10
To: u-boot at lists.denx.de<mailto:u-boot@lists.denx.de>
Cc: Wilson Ding <dingwei at marvell.com<mailto:dingwei@marvell.com>>; 'Stefan Roese' <sr at denx.de<mailto:sr@denx.de>>; 'Simon Glass' <sjg at chromium.org<mailto:sjg@chromium.org>>
Subject: USB2.0 device timeout issue.

Hi all,
This is Terry from Marvell BSP team in ShangHai China.
We got one issue in USB like below:


1)      When reading large files(larger than 32M ) from USB2.0 u-disk, two of the disks got the timeout error like below:
Marvell>> fatload usb 0:1 0x1000000 got.mkv 0x2000000
reading got.mkv
EHCI timed out on TD - token=0x1e008d80
EHCI timed out on TD - token=0x1e008d80
EHCI timed out on TD - token=0x1e008d80
Error reading cluster
** Unable to read file got.mkv **

2)      I did some research on this issue and found that this issue disappear if we set “USB_MAX_XFER_BLK” to a smaller value.
/common/usb_storage.c
@@ -145,7 +145,7 @@ struct us_data {
  * limited to 65535 blocks.
  */
#elif defined(CONFIG_USB_EHCI)
-#define USB_MAX_XFER_BLK  65535
+#define USB_MAX_XFER_BLK  8000


3)      We also did some test in linux, it works in linux, we found that linux set the max_sectors to 240, and even we set them to a larger value,

The maximum value is 512, which is safe compares to the 8000 in Uboot.

Reference link for linux: http://www.linux-usb.org/FAQ.html#i5


4)      I found in Uboot forum, other guys met the same problem with us, see the link below:

https://lists.denx.de/pipermail/u-boot/2016-February/246405.html

and there is also some patches to find the optimal value of USB_MAX_XFER_BLK

https://www.mail-archive.com/u-boot at lists.denx.de/msg215952.html
But these patches have not been pushed to the mainline code.

Could you please share your ideas, why we didn’t merge the patches and how should we fix this issue?
Thanks.

Best Regards,
Terry

                 reply	other threads:[~2017-05-15  4:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2a178e2f7bfc48d8844a937a722a646f@SC-EXCH04.marvell.com \
    --to=bjzhou@marvell.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.