The SD partitions can not be recognized after resume if one of the partitions is mounted before hibernate

Bug #193177 reported by Zhao Fan
6
Affects Status Importance Assigned to Milestone
Moblin Kernel
Triaged
Medium
Feng Tang

Bug Description

Bug detailed description:
--------------------------
The SD partitions can not be recognized after resume if one of the partitions is mounted before hibernate.

When I plug in an SD card, the system will recognize the device as /dev/mmcblk0, and the partitions will be recognized as /dev/mmcblk0p1, /dev/mmcblk0p2 ... Then I mount /dev/mmcblk0p1 to one folder and hibernate the device, after resume, I can only see /dev/mmcblk0, but can not see the partitions. Even unplug and plug the SD card again can not work around the issue, so the device can not be used again unless clean boot the device.

Reproduce steps:
----------------
(1) Plugin an SD card
(2) mount /dev/mmcblk0p1 /mnt
(3) push the power button to hibernate
(4) push the power button to resume
(5) Check if there is /dev/mmcblk0p1 file

Current result:
----------------
The SD partitions can not be recognized after resume

Expected result:
----------------
The SD card could continue to work normally after resume

Basic root-causing log:
----------------------

Zhao Fan (fan-zhao)
Changed in moblin-kernel:
assignee: nobody → feng-tang
importance: Undecided → Medium
Revision history for this message
Jing Wang (jing-j-wang) wrote :

Per check, one of D0's SD slot seems not good. When swiching to another SD slot, seems issue disppear. Mark it as Invalid

Revision history for this message
Jing Wang (jing-j-wang) wrote :

Sorry, add comments to wrong bug

Feng Tang (feng-tang)
Changed in moblin-kernel:
status: New → Triaged
alek du (alek-du)
Changed in moblin-kernel:
milestone: none → m10
Revision history for this message
Feng Tang (feng-tang) wrote :

This is a known issue just like removable USB disk.

Actually SD/MMC driver has provided a solution. There is a "dangerous" kernel option CONFIG_MMC_UNSAFE_RESUME to fix this issue. It depends the customers to chose whether to enable this option.

I attached the option's description here:

config MMC_UNSAFE_RESUME
        bool "Allow unsafe resume (DANGEROUS)"
        help
          If you say Y here, the MMC layer will assume that all cards
          stayed in their respective slots during the suspend. The
          normal behaviour is to remove them at suspend and
          redetecting them at resume. Breaking this assumption will
          in most cases result in data corruption.

          This option is usually just for embedded systems which use
          a MMC/SD card for rootfs. Most people should say N here.

Changed in moblin-kernel:
status: Triaged → Fix Committed
Revision history for this message
Chang Liu (chang-l-liu) wrote :

this issue is fixed on crownbeach d1, 20080331 image.
after hibernate and resume , type "fdisk -l", and /dev/mmcblk0p1 partition can be seen

Chang Liu (chang-l-liu)
Changed in moblin-kernel:
status: Fix Committed → Fix Released
Zhao Fan (fan-zhao)
Changed in moblin-kernel:
status: Fix Released → Fix Committed
Zhao Fan (fan-zhao)
Changed in moblin-kernel:
milestone: m10 → fix-later
status: Fix Committed → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.