linux-stable-rt/Documentation
Adrian Hunter dfe86cba76 mmc: add erase, secure erase, trim and secure trim operations
SD/MMC cards tend to support an erase operation.  In addition, eMMC v4.4
cards can support secure erase, trim and secure trim operations that are
all variants of the basic erase command.

SD/MMC device attributes "erase_size" and "preferred_erase_size" have been
added.

"erase_size" is the minimum size, in bytes, of an erase operation.  For
MMC, "erase_size" is the erase group size reported by the card.  Note that
"erase_size" does not apply to trim or secure trim operations where the
minimum size is always one 512 byte sector.  For SD, "erase_size" is 512
if the card is block-addressed, 0 otherwise.

SD/MMC cards can erase an arbitrarily large area up to and
including the whole card.  When erasing a large area it may
be desirable to do it in smaller chunks for three reasons:

    1. A single erase command will make all other I/O on the card
       wait.  This is not a problem if the whole card is being erased, but
       erasing one partition will make I/O for another partition on the
       same card wait for the duration of the erase - which could be a
       several minutes.

    2. To be able to inform the user of erase progress.

    3. The erase timeout becomes too large to be very useful.
       Because the erase timeout contains a margin which is multiplied by
       the size of the erase area, the value can end up being several
       minutes for large areas.

"erase_size" is not the most efficient unit to erase (especially for SD
where it is just one sector), hence "preferred_erase_size" provides a good
chunk size for erasing large areas.

For MMC, "preferred_erase_size" is the high-capacity erase size if a card
specifies one, otherwise it is based on the capacity of the card.

For SD, "preferred_erase_size" is the allocation unit size specified by
the card.

"preferred_erase_size" is in bytes.

Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
Acked-by: Jens Axboe <axboe@kernel.dk>
Cc: Kyungmin Park <kmpark@infradead.org>
Cc: Madhusudhan Chikkature <madhu.cr@ti.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Ben Gardiner <bengardiner@nanometrics.ca>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-12 08:43:30 -07:00
..
ABI USB: gadget: storage: optional SCSI WRITE FUA bit 2010-08-10 14:35:42 -07:00
DocBook kfifo: replace the old non generic API 2010-08-11 08:59:23 -07:00
PCI
RCU
accounting
acpi
aoe
arm
auxdisplay
blackfin
block
blockdev
cdrom
cgroups
connector
console
cpu-freq
cpuidle
cris
crypto
development-process
device-mapper
driver-model
dvb
early-userspace
fault-injection
fb
filesystems Merge git://git.kernel.org/pub/scm/linux/kernel/git/pkl/squashfs-linus 2010-08-11 09:20:13 -07:00
firmware_class
frv
hwmon hwmon: f71882fg: add support for the Fintek F71808E 2010-08-09 20:45:10 -07:00
i2c
i2o
ia64
ide
infiniband
input
ioctl Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 2010-08-07 17:09:24 -07:00
isdn
ja_JP
kbuild
kdump
ko_KR
kvm
laptops
lguest
m68k
make
mips
misc-devices
mmc mmc: add erase, secure erase, trim and secure trim operations 2010-08-12 08:43:30 -07:00
mn10300
mtd
namespaces
netlabel
networking Documentation/networking/wavelan.txt: deleted, not in tree 2010-08-11 08:59:18 -07:00
parisc
pcmcia
power
powerpc dts: add sdhci,auto-cmd12 field for p4080 device tree 2010-08-11 08:59:05 -07:00
pps
prctl
s390
scheduler
scsi
serial
sh
sound
sparc
spi
sysctl oom: enable oom tasklist dump by default 2010-08-09 20:44:56 -07:00
telephony
thermal
timers
trace vmscan: tracing: add a postprocessing script for reclaim-related ftrace events 2010-08-09 20:45:00 -07:00
uml
usb USB: gadget: g_multi: added documentation and INF files 2010-08-10 14:35:37 -07:00
video4linux V4L/DVB: Documentation: add v4l2-controls.txt documenting the new controls API 2010-08-08 23:43:04 -03:00
vm
w1
watchdog
wimax
x86
zh_CN
.gitignore
00-INDEX mmc: add erase, secure erase, trim and secure trim operations 2010-08-12 08:43:30 -07:00
BUG-HUNTING
Changes
CodingStyle
DMA-API-HOWTO.txt Documentation: DMA-API-HOWTO.txt: add multiple types of IOMMUs support 2010-08-11 08:59:21 -07:00
DMA-API.txt dma-mapping: remove dma_is_consistent API 2010-08-11 08:59:21 -07:00
DMA-ISA-LPC.txt
DMA-attributes.txt
HOWTO
IPMI.txt
IRQ-affinity.txt
IRQ.txt
Intel-IOMMU.txt
Makefile
ManagementStyle
SAK.txt
SELinux.txt
SM501.txt
SecurityBugs
Smack.txt
SubmitChecklist
SubmittingDrivers
SubmittingPatches SubmittingPatches: add more about patch descriptions 2010-08-09 20:45:05 -07:00
VGA-softcursor.txt
apparmor.txt
applying-patches.txt
atomic_ops.txt
bad_memory.txt
basic_profiling.txt
binfmt_misc.txt
braille-console.txt
bt8xxgpio.txt
btmrvl.txt
bus-virt-phys-mapping.txt
cachetlb.txt
circular-buffers.txt
coccinelle.txt
cpu-hotplug.txt
cpu-load.txt
cputopology.txt
credentials.txt
dcdbas.txt
debugging-modules.txt
debugging-via-ohci1394.txt
dell_rbu.txt
devices.txt
dmaengine.txt
dontdiff
dynamic-debug-howto.txt
edac.txt
eisa.txt
email-clients.txt
feature-removal-schedule.txt dma-mapping: add DMA_xxBIT_MASK to feature-removal-schedule.txt 2010-08-11 08:59:22 -07:00
flexible-arrays.txt
futex-requeue-pi.txt
gcov.txt
gpio.txt gpiolib: decouple might_sleep_if() from DEBUG 2010-08-11 08:59:08 -07:00
highuid.txt
hw_random.txt
init.txt
initrd.txt
intel_txt.txt
io-mapping.txt
io_ordering.txt
iostats.txt
irqflags-tracing.txt
isapnp.txt
java.txt
kernel-doc-nano-HOWTO.txt
kernel-docs.txt
kernel-parameters.txt panic: keep blinking in spite of long spin timer mode 2010-08-11 08:59:22 -07:00
keys-request-key.txt
keys.txt
kmemcheck.txt
kmemleak.txt
kobject.txt
kprobes.txt
kref.txt
ldm.txt
leds-class.txt
leds-lp3944.txt
local_ops.txt
lockdep-design.txt
lockstat.txt
logo.gif
logo.txt
magic-number.txt
mca.txt
md.txt
memory-barriers.txt
memory-hotplug.txt
memory.txt
mono.txt
mutex-design.txt
nmi_watchdog.txt
nommu-mmap.txt
numastat.txt
oops-tracing.txt
padata.txt Documentation/padata.txt: fix typos etc. 2010-08-11 08:59:18 -07:00
parport-lowlevel.txt
parport.txt
pi-futex.txt
pnp.txt
preempt-locking.txt
printk-formats.txt
prio_tree.txt
rbtree.txt
rfkill.txt
robust-futex-ABI.txt
robust-futexes.txt
rt-mutex-design.txt
rt-mutex.txt
rtc.txt
serial-console.txt
sgi-ioc4.txt
sgi-visws.txt
sparse.txt
spinlocks.txt
stable_api_nonsense.txt
stable_kernel_rules.txt
svga.txt
sysfs-rules.txt
sysrq.txt
tomoyo.txt
unaligned-memory-access.txt
unicode.txt
unshare.txt
vgaarbiter.txt
video-output.txt
volatile-considered-harmful.txt
zorro.txt