summaryrefslogtreecommitdiff
path: root/drivers/mmc/card/queue.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-04-21 12:44:37 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-04-21 12:44:37 -0700
commit126a3483d6e3c3370a2c7976073a0f4a5c942318 (patch)
tree1c176fe1ed331b93463440c50c249a9eb7ef2496 /drivers/mmc/card/queue.c
parent8898159650093e9eee8829e30a9139b4273a0ac4 (diff)
parent7c5709194096beea1ab6e6db46768d70a068efb0 (diff)
Merge tag 'mmc-fixes-for-3.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc
Pull MMC fixes from Chris Ball: - Build fix for omap_hsmmc with OF against 3.4-rc1. - Fix CONFIG_MMC_UNSAFE_RESUME semantics regression against 3.3, which broke hotplug card detection when UNSAFE_RESUME is set. - Fix a race condition in omap_hsmmc with runtime PM. - Fix two libertas SDIO-powered-resume regressions. - Small fixes for discard/sanitize, dw_mmc, cd-gpio and esdhc-imx. * tag 'mmc-fixes-for-3.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc: mmc: core: Do not pre-claim host in suspend mmc: dw_mmc: prevent NULL dereference for dma_ops mmc: unbreak sdhci-esdhc-imx on i.MX25 mmc: cd-gpio: Include header to pickup exported symbol prototypes mmc: sdhci: refine non-removable card checking for card detection mmc: dw_mmc: Fix switch from DMA to PIO mmc: remove MMC bus legacy suspend/resume method mmc: omap_hsmmc: Get rid of of_have_populated_dt() usage mmc: omap_hsmmc: build fix for CONFIG_OF=y and CONFIG_MMC_OMAP_HS=m mmc: fixes for eMMC v4.5 sanitize operation mmc: fixes for eMMC v4.5 discard operation
Diffstat (limited to 'drivers/mmc/card/queue.c')
-rw-r--r--drivers/mmc/card/queue.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c
index 2517547b436..996f8e36e23 100644
--- a/drivers/mmc/card/queue.c
+++ b/drivers/mmc/card/queue.c
@@ -139,7 +139,7 @@ static void mmc_queue_setup_discard(struct request_queue *q,
queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, q);
q->limits.max_discard_sectors = max_discard;
- if (card->erased_byte == 0)
+ if (card->erased_byte == 0 && !mmc_can_discard(card))
q->limits.discard_zeroes_data = 1;
q->limits.discard_granularity = card->pref_erase << 9;
/* granularity must not be greater than max. discard */