diff options
author | Ben Hutchings <ben@decadent.org.uk> | 2009-12-14 21:01:29 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-15 11:53:35 -0500 |
commit | bd68e0838fe85794b06892054772fa013a8d1986 (patch) | |
tree | adb0a3a1aad94f756b7d3d2f8e077877a0b982d0 /drivers/mmc/core/Kconfig | |
parent | c78402e95dd8238ee2b0e6e62b9a0c8b2bb9bba9 (diff) |
mmc: add module parameter to set whether cards are assumed removable
Some people run general-purpose distribution kernels on netbooks with
a card that is physically non-removable or logically non-removable
(e.g. used for /home) and cannot be cleanly unmounted during suspend.
Add a module parameter to set whether cards are assumed removable or
non-removable, with the default set by CONFIG_MMC_UNSAFE_RESUME.
In general, it is not possible to tell whether a card present in an MMC
slot after resume is the same that was there before suspend. So there are
two possible behaviours, each of which will cause data loss in some cases:
CONFIG_MMC_UNSAFE_RESUME=n (default): Cards are assumed to be removed
during suspend. Any filesystem on them must be unmounted before suspend;
otherwise, buffered writes will be lost.
CONFIG_MMC_UNSAFE_RESUME=y: Cards are assumed to remain present during
suspend. They must not be swapped during suspend; otherwise, buffered
writes will be flushed to the wrong card.
Currently the choice is made at compile time and this allows that to be
overridden at module load time.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: Wouter van Heyst <larstiq@larstiq.dyndns.org>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/mmc/core/Kconfig')
-rw-r--r-- | drivers/mmc/core/Kconfig | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mmc/core/Kconfig b/drivers/mmc/core/Kconfig index ab37a6d9d32a..bb22ffd76ef8 100644 --- a/drivers/mmc/core/Kconfig +++ b/drivers/mmc/core/Kconfig | |||
@@ -3,7 +3,7 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | config MMC_UNSAFE_RESUME | 5 | config MMC_UNSAFE_RESUME |
6 | bool "Allow unsafe resume (DANGEROUS)" | 6 | bool "Assume MMC/SD cards are non-removable (DANGEROUS)" |
7 | help | 7 | help |
8 | If you say Y here, the MMC layer will assume that all cards | 8 | If you say Y here, the MMC layer will assume that all cards |
9 | stayed in their respective slots during the suspend. The | 9 | stayed in their respective slots during the suspend. The |
@@ -14,3 +14,5 @@ config MMC_UNSAFE_RESUME | |||
14 | This option is usually just for embedded systems which use | 14 | This option is usually just for embedded systems which use |
15 | a MMC/SD card for rootfs. Most people should say N here. | 15 | a MMC/SD card for rootfs. Most people should say N here. |
16 | 16 | ||
17 | This option sets a default which can be overridden by the | ||
18 | module parameter "removable=0" or "removable=1". | ||