From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Tue, 07 Apr 2015 09:34:53 -0600 Subject: [U-Boot] [PATCH] usb: hub: allow pgood_delay to be specified via env In-Reply-To: References: <1428329107-2294-1-git-send-email-tharvey@gateworks.com> <201504061658.11313.marex@denx.de> Message-ID: <5523F91D.1020001@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 04/07/2015 08:52 AM, Tim Harvey wrote: > On Mon, Apr 6, 2015 at 7:58 AM, Marek Vasut wrote: >> On Monday, April 06, 2015 at 04:05:07 PM, Tim Harvey wrote: >>> Some USB devices break the spec and require longer warm-up times. Allow >>> the usb_pgood_delay env variable to override the calculated time. >>> >>> I have encountered this specficically with several different sized/branded >>> USB sticks with VID:PID 058f:6387 (Alcor Micro Corp. Transcend JetFlash) >>> where I need to set usb_pgood_delay to 2000ms to make them detectable. >>> >>> Signed-off-by: Tim Harvey >> >> Hi! >> >> this looks like a good idea. I have a hint for improvement -- in case you >> get a timeout waiting for the device to be detected, maybe the error message >> should mention that you can try setting this env variable and try again ? >> >> Best regards, >> Marek Vasut > > Marek, > > I'm not sure what 'failed detect' would be appropriate though. In my > case I was dealing with storage devices so I think what you are > proposing is that on a 'usb start' if 0 storage devices are found > display a message such as: > > No storage devices found - if a connected device is not being detected > try setting usb_pgood_delay env var to something above the 1000ms time > the USB spec allows That seems like something better for the documentation that at run-time. There's no reason to believe that the user has any USB storage devices plugged in. > Sounds a bit verbose and I'm not clear if it should be limited to USB > storage devices or other supported devices (I'm betting its just the > storage ones that often break the spec). > > Stephen, what do you think? You and I discussed adding such an env var > about a year ago. If there is some kind of error that's actively detected, it may make sense to print some kind of message. However, if the symptoms are that devices simply don't appear on the bus and there's no reason to believe any are actually plugged in, that fells different.