[Trac #221] SD on BTest does not report CID properly.

Zarro Boogs per Child bugtracker at laptop.org
Mon Oct 23 08:28:55 EDT 2006


#221: SD on BTest does not report CID properly.
----------------------+-----------------------------------------------------
 Reporter:  jg        |       Owner:  mfoster
     Type:  defect    |      Status:  new    
 Priority:  blocker   |   Milestone:  BTest-1
Component:  hardware  |    Keywords:  CID    
----------------------+-----------------------------------------------------
 Aside from the known issue of the sdhci driver aborting early due to an
 invalid iomem size (!= 0x100), there's an issue of how the controller
 reports the CID when a card is inserted.

 Inside of mmc_discover_cards, we keep sending the following mc_command:
 {{{
     cmd.opcode = MMC_ALL_SEND_CID;
     cmd.arg = 0;
     cmd.flags = MMC_RSP_R2 | MMC_CMD_BCR;
 }}}
 The intent is to find all cards on the system.  What the controller
 *should* do is find one card, return the CID, and then the next time the
 command is sent, either time out or return no CIDs.

 Instead, the CAFE controller is returning a distinct CID every time the
 command is sent (with a card inserted):
 {{{
 calling mmc_discover_cards
 [...]
 got a new card; CID 3534453:44303247:8020e48b:48052000
 number of cards: 2
 got a new card; CID 3534453:44303247:8020e48b:49070000
 number of cards: 3
 [...]
 got a new card; CID 3534453:44303247:8020e48b:58070000
 number of cards: 18
 got a new card; CID 3534453:44303247:8020e48b:59070000
 number of cards: 19
 got a new card; CID 3534453:44303247:8020e48b:5a070000
 number of cards: 20
 }}}

 And so on, looping infinitely.  Note the last byte has incrementing
 values.  I don't know why the controller is returning a new CID every time
 it's queried when a card is inserted, but clearly something's buggy there.

 When the card finding code is made to exit early (after finding exactly
 one card), we end up w/ tons of:

 {{{
 mmcblk0: error 1 transferring data
 end_request: I/O error, dev mmcblk0, sector 0
 mmcblk0: error 1 transferring data
 end_request: I/O error, dev mmcblk0, sector 0
 mmcblk0: error 1 transferring data
 }}}
 After many of those, we get:
 {{{
 mmcblk1: mmc0:8b49 2_Z�� 1985024KiB (ro)
  mmcblk1: unknown partition table
 bound device 'mmc0:8b49' to driver 'mmcblk'
 mmc: Bound Device mmc0:8b49 to Driver mmcblk
 }}}
 This actually was a 2GB card, so it appears to at least have detected the
 capacity correctly.

-- 
Ticket URL: <http://dev.laptop.org/ticket/221>
One Laptop Per Child <http://laptop.org/>



More information about the Devel mailing list