]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
mmc: Add MMC_QUIRK_ERASE_BROKEN for some cards
authorPhil Elwell <phil@raspberrypi.org>
Wed, 11 May 2016 11:50:33 +0000 (12:50 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 8 Aug 2017 12:51:58 +0000 (14:51 +0200)
commitaa1390dd9780ad135a94d80b0b325d43b8a787d1
tree7a7f9c2c466990a27c43ae76a908efdebd3e665f
parent0938edfbef7fa600e28cbf9ce6dad498fbe0e1a7
mmc: Add MMC_QUIRK_ERASE_BROKEN for some cards

Some SD cards have been found that corrupt data when small blocks
are erased. Add a quirk to indicate that ERASE should not be used,
and set it for cards of that type.

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
mmc: Apply QUIRK_BROKEN_ERASE to other capacities

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
mmc: Add card_quirks module parameter, log quirks

Use mmc_block.card_quirks to override the quirks for all SD or MMC
cards. The value is a bitfield using the bit positions defined in
include/linux/mmc/card.h. If the module parameter is placed in the
kernel command line (or bootargs) stored on the card then, assuming the
device only has one SD card interface, the override effectively becomes
card-specific.

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
drivers/mmc/core/block.c
drivers/mmc/core/core.c
include/linux/mmc/card.h