From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aras Vaichas Date: Wed, 19 Mar 2008 12:56:59 +1100 Subject: [U-Boot-Users] usb storage return value is always true Message-ID: <47E072EB.10309@magtech.com.au> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de I'm using U-Boot 1.3.2 with AT91RM9200 custom board (based on DK) At boot time I want to detect that a USB storage device has been inserted, and then I want to attempt to load an image off it and upgrade my system. If I run "usb storage" it always returns 0 - even if there is no USB storage device inserted. If I run fatload on a non-existent device, it has a very long timeout period. e.g. U-Boot> usb start (Re)start USB... USB: scanning bus for devices... 1 USB Device(s) found scanning bus for storage devices... 0 Storage Device(s) found U-Boot> usb storage; echo $? No storage devices, perhaps not 'usb start'ed..? 0 U-Boot> usb start (Re)start USB... USB: scanning bus for devices... 2 USB Device(s) found scanning bus for storage devices... 1 Storage Device(s) found U-Boot> usb storage; echo $? Device 0: Vendor: Prod.: Rev: PMAP Type: Removable Hard Disk Capacity: 245.5 MB = 0.2 GB (502784 x 512) 0 Is there a way to detect if a USB storage device has been inserted? Aras ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________