public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] Issue with USB mass storage (thumb drives)
Date: Fri, 20 May 2016 13:52:35 +0200	[thread overview]
Message-ID: <573EFA83.4000901@denx.de> (raw)
In-Reply-To: <HE1PR0401MB2028208E73DC7606C6F7463EE34B0@HE1PR0401MB2028.eurprd04.prod.outlook.com>

On 05/20/2016 07:07 AM, Rajesh Bhagat wrote:
> 
> 
>> -----Original Message-----
>> From: U-Boot [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Marek Vasut
>> Sent: Tuesday, May 10, 2016 6:02 PM
>> To: Diego <diego.ml@zoho.com>
>> Cc: u-boot at lists.denx.de; Stefan Roese <sr@denx.de>
>> Subject: Re: [U-Boot] Issue with USB mass storage (thumb drives)
>>
>> On 05/10/2016 02:04 PM, Diego wrote:
>>> In data mercoled? 4 maggio 2016 23:36:46, Marek Vasut ha scritto:
>>>> On 05/04/2016 04:06 PM, Diego wrote:
>>>>> In data mercoled? 4 maggio 2016 13:45:57, Marek Vasut ha scritto:
>>>>>> On 05/04/2016 11:13 AM, Diego wrote:
>>>>>>> <snip>
>>>>>>> So I see three options:
>>>>>>> 1) 65535 default with quirk table
>>>>>>> 2) 32767 default without quirk table
>>>>>>> 3) 32767 default with quirk table
>>>>>>>
>>>>>>> Personally I think 3) would be the safest solution, but I think 2)
>>>>>>> would at least work for most thumb drives.
>>>>>>
>>>>>> 1) with the quirk table would be the way to go, modern(ish) drives
>>>>>> should work fine with 65535 .
>>>>>
>>>>> I personally can't see any improvement with more recent thumb
>>>>> drives, quite the opposite.
>>>>>
>>>>> <snip>
>>>>> Why are you saying modern(ish) drives should work?
>>>>
>>>> Hmmmmm :-(
>>>>
>>>>> For others following the thread, please post your experience,
>>>>> especially with more recent drives (remember to test with files >16MB).
>>>>
>>>> I don't think it's really worth doing a thread about which sticks
>>>> work and which don't. I would find it much more valuable to address
>>>> this issue properly. I wonder if it would make sense to, instead of
>>>> starting with a big value which might not work, start with a
>>>> small(er) value and increase it with each subsequent block transfer.
>>>> Quite similarly to what TCP does. Would you be willing to look into it ?
>>>>
>>>
>>> Hi Marek,
>>
>> Hi!
>>
>>> so your proposal is to ramp up transferred block size during transfer?
>>> What's the rationale behind the proposal? In other words, why do you
>>> think it will fix the problem?
>>
>> You will get one transfer failure somewhere in the middle and this will let you
>> determine the maximum transfer size for particular stick.
>>
>>> Regarding implementing your proposal, it might take me very long to
>>> find some time to dedicate to it, so if anybody else wants to step up
>>> before I look at it, just raise your hand.
>>
>> OK
>>
> 
> Hello Marek, 
> 
> I have a question regarding USB_MAX_XFER_BLK macro, Why XHCI code doesn't seem to 
> focus on this value and is not impacted, kept the value so low i.e. 20?
> 
> #ifdef CONFIG_USB_EHCI
> /*
>  * 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.
>  */
> #define USB_MAX_XFER_BLK        65535
> #else
> #define USB_MAX_XFER_BLK        20
> #endif
> 
> Common code suggests it is used in same way as used in EHCI. Please comment.

The MAX_XFER_BLK = 20 was for OHCI/UHCI, so the code should likely be
patches to set it to higher value for XHCI. Feel free to test and send a
patch.

Thanks

Best regards,
Marek Vasut

  reply	other threads:[~2016-05-20 11:52 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
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 [this message]
2016-02-04  8:06                   ` Schrempf Frieder
  -- strict thread matches above, loose matches on Subject: below --
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=573EFA83.4000901@denx.de \
    --to=marex@denx.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox