[U-Boot] 'usb start' works very unstable

Prafulla Wadaskar
2010-08-07T19:47:19Z

> -----Original Message-----
> From: u-boot-bounces at lists.denx.de
> [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Sergei Trofimovich
> Sent: Saturday, August 07, 2010 7:10 PM
> To: Wolfgang Denk
> Cc: u-boot at lists.denx.de
> Subject: Re: [U-Boot] 'usb start' works very unstable
>
> > > It's a tip of 'u-boot-marvell/testing' branch.
> >
> > Did you try current mainline instead? It is usually not recommended
> > to use any of the custodian trees and especially their testing
> > branches unless you know _exactly_ what these contain and
> what you are
> > looking after.
>
> I was not sure sheevaplug support was merged. Pesky page [0]
> suggested it
> and I thought i's called 'mainline'.
>
> Ok, trying 'u-boot/master' v2010.06-267-gb1f95b4 with latest commit
>
> > commit b1f95b4438a6d44e12f04e7f51412f7a711ef87b
> > Author: Wolfgang Denk <wd@denx.de>
> > Date: Sat Aug 7 00:32:50 2010 +0200
> >
> > Replace CHANGELOG files by auto-generated "snapshot.commit"
>
> Marvell>> version
>
> U-Boot 2010.06-00267-gb1f95b4 (Aug 07 2010 - 15:30:45)
> Marvell-Sheevaplug
>
> > > [ 23.015860] scsi0 : usb-storage 1-1:1.0
> > > [ 26.054268] scsi 0:0:0:0: Direct-Access
> StoreJet Transcend PQ: 0 ANSI: 2 CCS
> > > [ 28.774083] sd 0:0:0:0: [sda] 488397168 512-byte
> logical blocks: (250 GB/232 GiB)
> > ...
> >
> > > Device 0: Vendor: StoreJet Rev: Prod: Transcend
> > > Type: Hard Disk
> > > Capacity: 28759.9 MB = 28.0 GB (488397168 x 512)
> > >
> > > Heh, capacity is reported incorrectly, but it works am I'm able
> > > to load kernel from there.
> > The reason for this is that the multiplication 488397168 x 512 will
> > overflow a 32 bit integer as used in "disk/part.c"; this shouldbe
> > fixed...
>
> This issue is still here:
>
> Marvell>> usb start
> (Re)start USB...
> USB: Register 10011 NbrPorts 1
> USB EHCI 1.00
> scanning bus for devices... 2 USB Device(s) found
> scanning bus for storage devices... 1 Storage
> Device(s) found
> Marvell>> usb storage
> Device 0: Vendor: StoreJet Rev: Prod: Transcend
> Type: Hard Disk
> Capacity: 28759.9 MB = 28.0 GB (488397168 x 512)
>
> Latest change in 'disk/part.c' is:
> > commit 4b142febff71eabdb7ddbb125c7b583b24ddc434
>
> > Author: Heiko Schocher <hs@denx.de>
>
> > Date: Thu Dec 3 11:21:21 2009 +0100
>
> Which looks older, than u-boot-marvell branch.
>
> > > All these things are almost 100% reproducible.
> > >
> > > Vendor-shipped (Marvell's) u-boot has exactly the same disease:
> > > ** MARVELL BOARD: SHEEVA PLUG LE
> > > U-Boot 1.1.4 (Mar 19 2009 - 16:06:59) Marvell version: 3.4.16
> >
> > This can be anything - issues with the USB driver, missing or
> > incorrect initializatioon of the SoC, or even hardware issues.
> >
> > Can you try to debug it?
>
> And I can't reproduce it anymore with 'u-boot/master'.
> Rebooted 3 times and I have stable detection \o/.
>
> I can still reproduce another (hardware?) failure in a dirty way:
> 1. Boot Linux kernel
> 2. run hdparm on the root partition (not the beast idea, as
> we will see):
> sh-4.0# hdparm /dev/sda
> /dev/sda:
> HDIO_DRIVE_CMD(identify) failed: Invalid exchange
> readonly = 0 (off)
> readahead = 256 (on)
> geometry = 30401/255/63, sectors = 488397168, start = 0
> system losts USB, root, and ability to run binaries
> 3. attach with JTAG:
> $sudo openocd -f /usr/share/openocd/scripts/board/sheevaplug.cfg
> Open On-Chip Debugger 0.5.0-dev-00466-g28ddefd (2010-08-06-22:54)
> ...
> > reset

This will just reset the Kirkwood and not entire system, u-boot performs some basic initialization that may not be sufficient to bring back already sucked peripharal unless we reset them.

I think - If the things work with true system reset (i.e. re-power) that is well withing u-boot's scope and limitation.

Regards..
Prafulla . .