All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Schmelzer <hannes@schmelzer.or.at>
To: u-boot@lists.denx.de
Subject: [U-Boot] Issue with USB mass storage (thumb drives)
Date: Fri, 12 Feb 2016 17:04:57 +0100	[thread overview]
Message-ID: <56BE02A9.8060002@schmelzer.or.at> (raw)
In-Reply-To: <CAPnjgZ3+so5_BYO-1fCu4dTnfMUW4ZqDUerkr58PHiAeBmJfOw@mail.gmail.com>


On 2016-02-12 16:53, Simon Glass wrote:
> Hi,
>
> On 8 February 2016 at 07:58, Marek Vasut <marex@denx.de> wrote:
>> On Monday, February 08, 2016 at 09:41:09 AM, Hannes Schmelzer wrote:
>>> On 04.02.2016 12:28, Marek Vasut wrote:
>>>> On Thursday, February 04, 2016 at 09:21:08 AM, Schrempf Frieder wrote:
>>>>> On 03.02.2016 20:16, Sergei Temerkhanov wrote:
>>>>>> On Wed, Feb 3, 2016 at 8:40 AM, Marek Vasut <marex@denx.de> wrote:
>>>>>>> On Wednesday, February 03, 2016 at 12:49:20 PM, Schrempf Frieder wrote:
>>>>>>>> On 03.02.2016 12:12, Marek Vasut wrote:
>>>>>>>>> On Wednesday, February 03, 2016 at 11:15:00 AM, Schrempf Frieder wrote:
>>>>>>>>>> On 03.02.2016 10:55, Fabio Estevam wrote:
>>>>>>>>>>> On Wed, Feb 3, 2016 at 7:40 AM, Marek Vasut <marex@denx.de> wrote:
>>>>>>>>>>>> In that case, debug time.
>>>>>>>>>>>>
>>>>>>>>>>>> Usual problems are bad routing of the tracks on the board , so
>>>>>>>>>>>> try with USB 1.1 hub and if that works, that's your problem.
>>>>>>>>>>> Another suggestion would be to try the 100MB transfer in Linux and
>>>>>>>>>>> see if this works or not.
>>>>>>>>>>>
>>>>>>>>>>> That would help us to narrow down whether this is a hardware or
>>>>>>>>>>> software problem.
>>>>>> Another thing to try may be limiting the value of USB_MAX_XFER_BLK in
>>>>>> common/usb_storage.c
>>>>> This was a really helpful hint! Thank you Sergei!
>>>>>
>>>>> I just tried to limit USB_MAX_XFER_BLK to 1/8 of the original value
>>>>> (65535 -> 8191) and this time the transfer works without timeouts.
>>>>>
>>>>> As we have a customer who needs this working as soon as possible my
>>>>> question now is how to properly solve this.
>>>>> Should I generally limit USB_MAX_XFER_BLK in my u-boot to avoid these
>>>>> errors? Which value to choose?
>>>> Nice! Can you share which sticks are those, ideally brand/type and USB
>>>> IDs ?
>>> Hi,
>>> that tip works also on my ZYNQ board.
>>>
>>> There is some comment around this 'magic-define':
>>>
>>> /*
>>>    * The U-Boot EHCI driver can handle any transfer length as long as
>>> there is
>>>    * enough free heap space left, but the SCSI READ(10) and WRITE(10)
>>> commands are
>>>    * limited to 65535 blocks.
>>>    */
>>>
>>> Can i assume that 16MiB free heap space is enough if i want read a 16MiB
>>> file ?
>> The file is actually not read into a buffer on a heap iirc, but directly to
>> the target location if that's in RAM.
> Is it possible that the timeout is genuinely being exceeded? See
> USB_TIMEOUT_MS in ehci_submit_async(). It looks like 5 seconds to load
> 32MB, which should be plenty.
Hi Simon,
thanks for joining. I also have found this USB_TIMOUT in usb.h and 
increesed for
testing purpose this 5s to about 30s ... without wanted result.
It now takes instead 5s this 30s to bring up the timout warning, but 
still with the effect,
that file finally couldn't be read.
> Perhaps this timeout should be dependent on the data size?
Indeed, it depends on size ... but i'm not sure if this size parameter 
is 'wired' with some timeout parameter.
> I really can't understand why the problem is address-dependent. I'm
> assuming the cache is set up normally.
This is confusing me also.
> Regards,
> Simon
Hannes

  reply	other threads:[~2016-02-12 16:04 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-02 10:35 [U-Boot] Issue with USB mass storage (thumb drives) Schrempf Frieder
2016-02-02 16:28 ` Fabio Estevam
2016-02-02 16:39   ` Marek Vasut
2016-02-03  7:40     ` Schrempf Frieder
2016-02-03  7:45       ` Hannes Schmelzer
2016-02-03  9:34         ` Marek Vasut
2016-02-03  9:40       ` Marek Vasut
2016-02-03  9:55         ` Fabio Estevam
2016-02-03 10:15           ` Schrempf Frieder
2016-02-03 11:12             ` Marek Vasut
2016-02-03 11:49               ` Schrempf Frieder
2016-02-03 16:40                 ` Marek Vasut
2016-02-03 19:16                   ` Sergei Temerkhanov
2016-02-04  8:21                     ` Schrempf Frieder
2016-02-04 11:28                       ` Marek Vasut
2016-02-08  8:41                         ` Hannes Schmelzer
2016-02-08 14:58                           ` Marek Vasut
2016-02-12 15:53                             ` Simon Glass
2016-02-12 16:04                               ` Hannes Schmelzer [this message]
2016-02-18 10:05                         ` Schrempf Frieder
2016-02-18 15:32                           ` Marek Vasut
2016-02-18 17:14                             ` Fabio Estevam
2016-02-22  7:03                               ` Schrempf Frieder
2016-02-22 17:51                                 ` Maxime Jayat
2016-02-22 17:59                                   ` Fabio Estevam
2016-02-23  6:38                                     ` Hannes Schmelzer
2016-02-24 17:43                                       ` Marek Vasut
2016-02-25  4:13                                         ` Simon Glass
2016-02-25 17:56                                           ` Marek Vasut
2016-02-26  1:56                                             ` Simon Glass
2016-04-14 13:20                           ` Diego
2016-04-15 10:53                             ` Marek Vasut
2016-04-15 12:13                               ` Diego
2016-04-18 23:54                                 ` Marek Vasut
2016-04-25  8:16                                   ` Stefan Roese
2016-04-27  2:14                                 ` Marek Vasut
2016-04-27  9:04                                   ` Diego
2016-04-27 16:13                                     ` Marek Vasut
2016-04-28 13:04                                       ` Diego
2016-04-28 22:49                                         ` Marek Vasut
2016-04-29  7:58                                           ` Diego
2016-05-03 21:01                                             ` Marek Vasut
2016-05-04  9:13                                               ` Diego
2016-05-04 11:45                                                 ` Marek Vasut
2016-05-04 14:06                                                   ` Diego
2016-05-04 21:36                                                     ` Marek Vasut
2016-05-10 12:04                                                       ` Diego
2016-05-10 12:32                                                         ` Marek Vasut
2016-05-20  5:07                                                           ` Rajesh Bhagat
2016-05-20 11:52                                                             ` Marek Vasut
2016-02-04  8:06                   ` Schrempf Frieder
2016-10-14  9:01 Michael Kasprowicz

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=56BE02A9.8060002@schmelzer.or.at \
    --to=hannes@schmelzer.or.at \
    --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.