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

Zarro Boogs per Child bugtracker at laptop.org
Sat Aug 2 19:29:03 EDT 2008


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

Comment(by wmb at firmworks.com):

 Fixed by svn 865, described as follows:

 OLPC trac 7774 - restructured the internal error code propagation and
 device initialization for USB mass storage devices to cope with devices
 that mis-report the data transfer status in the Command Status Wrapper
 protocol phase.  Some devices report "success" even when they don't
 return the requested data.  One such device reports "success" after
 failing to transfer the data for the "Read Capacity" command.  With
 the restructuring, the actual data transfer length as reported by
 the lower-level USB transport is propagated all the way up to the
 top level caller, so it can notice that the command didn't really
 succeed.  I also added a "Test Unit Ready" step at the beginning of
 the disk "open" method, thus making the system handle multi-card
 readers with several LUNs more cleanly.

 That change fixed the reported problem via the following mechanism:

 a) The device in question does report a command failure on the initial
 "Test Unit Ready" command.

 b) The command failure makes the USB mass storage stack perform a "Request
 Sense", which is the normal behavior so the stack can determine the
 detailed error code.

 c) The device also fails to return any data for that "Request Sense", but
 the revised stack now notices that case and behaves appropriately.  The
 device starts to work properly after the failed Request Sense.

 d) The stack retries the Test Unit Ready command , and this time it works
 because the device is now behaving properly.  Subsequent commands also
 work properly.

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


More information about the Bugs mailing list