]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: Do not advertise secure discard if it is blacklisted
authorLukas Czerner <lczerner@redhat.com>
Wed, 18 Jun 2014 11:18:07 +0000 (13:18 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Sat, 26 Jul 2014 09:13:39 +0000 (11:13 +0200)
commit106c66aea7b8b43a2bde73659f8bd91b5ab358d1
treeca75ded1e602effb1e55174ef6b908a2504dc6a8
parent5a1060b5e546d92739f84453f9f6ea6ec5702352
mmc: Do not advertise secure discard if it is blacklisted

Currently when the device secure discard implementation is
blacklisted (MMC_QUIRK_SEC_ERASE_TRIM_BROKEN quirk is set)
instead of secure discard we're going to do normal discard,
which is wrong.

When the secure discard is known to be broken we should just
disallow it entirely and not advertise this functionality to
the user. Fix it.

Also move mmc_fixup_device() in from of mmc_blk_alloc() so we
can get quirks set before we attempt to set queue information.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/card/block.c
drivers/mmc/core/core.c