Openmoko Bug #1802: Suspend/resume corrupts SD card's partition table

Openmoko Public Trac bugs at
Sat Sep 6 05:05:50 CEST 2008

#1802: Suspend/resume corrupts SD card's partition table
    Reporter:  montgoss         |        Owner:  openmoko-kernel
        Type:  defect           |       Status:  new            
    Priority:  normal           |    Milestone:                 
   Component:  System Software  |      Version:                 
    Severity:  critical         |   Resolution:                 
    Keywords:                   |    Blockedby:                 
Reproducible:                   |     Blocking:                 

Comment(by andy):

 The glamo driver is aware about it, in the io config callback export to
 mmc layer it figures out if we are applying power and if so sets the clock
 going and waits "1ms" which typically means 50ms.

 The mci layer should take care about powering us up and down logically,
 but in 2.6.24 in fact the PMU gets to go to suspend first, and pulls the
 power to SD Card before the mci stack does the deed.  But still it should
 get called later in suspend and do the wait with clock up thing.

 MCI stuff feels racy anyway, there is async mmc_rescan() thread going on
 behind all this on resume.  My guess is the trouble ultimately comes from
 a race in this area in mainline mci stuff.

 static void glamo_mci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)

         host->real_rate = __glamo_mci_set_card_clock(host, ios->clock,
         host->clk_div = div;

         /* after power-up, we are meant to give it >= 74 clocks so it can
          * initialize itself.  Doubt any modern cards need it but
         if (powering)

Ticket URL: <> <>
openmoko trac

More information about the openmoko-kernel mailing list