#7774 NORM Future : OFW fails with USB to Micro SD adapter

Zarro Boogs per Child bugtracker at laptop.org
Sun Aug 3 14:39:26 EDT 2008


#7774: OFW fails with USB to Micro SD adapter
-----------------------------------+----------------------------------------
   Reporter:  wmb at firmworks.com    |       Owner:  wmb at firmworks.com      
       Type:  defect               |      Status:  closed                 
   Priority:  normal               |   Milestone:  Future Release         
  Component:  ofw - open firmware  |     Version:  OFW development version
 Resolution:  fixed                |    Keywords:                         
Next_action:  never set            |    Verified:  0                      
  Blockedby:                       |    Blocking:                         
-----------------------------------+----------------------------------------

Comment(by wmb at firmworks.com):

 Replying to [comment:4 mikus]:

 ...
 >  [[BR]]
 > But if there is __NO__ SD card plugged in at the cardreader-hub, lines
 <4> and <6> still show up.  Now when I enter 'dir disk:\', it tells me
 "Can't open directory".


 The reason that lines <4> and <6> still show up is because the SD disk
 controller device is present even when the card is not inserted.  In the
 OFW device tree, a "disk" node represents a disk controller, with or
 without its media.

 OFW is usually configured so that it doesn't auto-probe "below" disk
 controllers to determine whether or not their media is present, because
 doing so can take a long time, which would detract from the goal of
 booting quickly in the normal cases.  (The reason it takes a long time is
 because some disks have spin-up times of 30 seconds or more, and some
 controllers support multiple units.  Probing everything can take several
 minutes.)

 The reason that "dir disk:\' "Can't open directory" is because the
 heuristic that creates the "disk" devalias is simple; it first looks for
 the last "../disk" node under the USB 2 tree (i.e. under /pci/usb at f,5).
 If it finds one, that becomes "disk".  In your case, it's binding to that
 unpopulated SD disk controller.


 > Whether or not there is a SD card plugged in at the cardreader-hub, the
 only way I have found to access an USB stick plugged in at the cardreader-
 hub is to use the *full* device name string in the OFW command - for
 example 'dir /pci/usb at f,5/hub at 3,0/scsi at 1,0/disk:\'.

 You should be able to abbreviate it by omitting some name components,
 e.g.:

    dir /scsi at 1/disk:\

 OFW's path resolution algorithm searches down the tree to find a match if
 path components are omitted.  In your case, the key disambiguation is
 "scsi at 1", because it's the "scsi at 3" that is overlaying the one you want.

-- 
Ticket URL: <http://dev.laptop.org/ticket/7774#comment:5>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system


More information about the Bugs mailing list