All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aras Vaichas <arasv@magtech.com.au>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] usb storage return value is always true
Date: Wed, 19 Mar 2008 12:56:59 +1100	[thread overview]
Message-ID: <47E072EB.10309@magtech.com.au> (raw)

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 
______________________________________________________________________

                 reply	other threads:[~2008-03-19  1:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=47E072EB.10309@magtech.com.au \
    --to=arasv@magtech.com.au \
    --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.