mmc: dw_mmc-rockchip: fix failing to mount partition with "discard"
authorShawn Lin <shawn.lin@rock-chips.com>
Tue, 1 Mar 2016 07:08:48 +0000 (15:08 +0800)
committerShawn Lin <shawn.lin@rock-chips.com>
Tue, 1 Mar 2016 07:46:48 +0000 (15:46 +0800)
commit42ca4e06a91ba13bc205d19eb29364606b13fa5a
tree1aa56c1287119bf0b123ba175bb27f685b0d7fcc
parent6662acdefe5cd9e670eba8a11cdcb4296f6932c6
mmc: dw_mmc-rockchip: fix failing to mount partition with "discard"

Without MMC_CAP_ERASE support, we fail to mount partition
with "discard" option since mmc_queue_setup_discard is limited
for checking mmc_can_erase. Without doing mmc_queue_setup_discard,
blk_queue_discard fails to test QUEUE_FLAG_DISCARD flag, so we get
the following log from f2fs(actually similar to other file system):

mounting with "discard" option, but the device does not support discard

Change-Id: Iee781795c9c61153644f0dd5b00dfc2cca6cc721
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
drivers/mmc/host/dw_mmc-rockchip.c