summaryrefslogtreecommitdiff
path: root/drivers/mmc/core/queue.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-05-24 14:56:38 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2022-05-24 14:56:38 -0700
commit638971b77f1c4fb9997c674ad66d1b96f7931c2b (patch)
treed9dc66aba53fe174aaebddc2264cfc11687a9c6b /drivers/mmc/core/queue.c
parentb1b5bf1640165063fd9b7c6aeb5c7d63c4cb3c1d (diff)
parentded2c4c345001a129293db4bc1fa9ae236ceb0d9 (diff)
Merge tag 'mmc-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc
Pull MMC updates from Ulf Hansson: "MMC core: - Support zero-out using TRIM for eMMC - Allow to override the busy-timeout for the ioctl-cmds MMC host: - Continued the conversion of DT bindings into the JSON schema - jz4740: Apply DMA engine limits to maximum segment size - mmci_stm32: Use a buffer for unaligned DMA requests - mmc_spi: Enabled high-speed modes via parsing of DT - omap: Make clock management to be compliant with CCF - renesas_sdhi: - Support eMMC HS400 mode for R-Car V3H ES2.0 - Don't allow support for eMMC HS400 for R-Car V3M/D3 - sdhci_am654: Fix problem when SD card slot lacks the card detect line - sdhci-esdhc-imx: Add support for the imx8dxl variant - sdhci-brcmstb: Enable support for clock gating to save power - sdhci-msm: - Add support for the sdx65 variant - Add support for the sm8150 variant - sdhci-of-dwcmshc: Add support for the Rockchip rk3588 variant - sdhci-pci-gli: Add workaround to allow GL9755 to enter ASPM L1.2" * tag 'mmc-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (52 commits) mmc: sdhci-of-arasan: Add NULL check for data field mmc: core: Support zeroout using TRIM for eMMC mmc: sdhci-brcmstb: Fix compiler warning mmc: sdhci-msm: Add compatible string check for sdx65 dt-bindings: mmc: sdhci-msm: Document the SDX65 compatible mmc: sdhci-msm: Add compatible string check for sm8150 dt-bindings: mmc: sdhci-msm: Add compatible string for sm8150 mmc: sdhci-msm: Add SoC specific compatibles dt-bindings: mmc: sdhci-msm: Convert bindings to yaml dt-bindings: mmc: brcm,sdhci-brcmstb: cleanup example dt-bindings: mmc: brcm,sdhci-brcmstb: correct number of reg entries mmc: sdhci-brcmstb: Enable Clock Gating to save power mmc: sdhci-brcmstb: Re-organize flags mmc: mmci: Remove custom ios handler mmc: atmel-mci: Simplify if(chan) and if(!chan) mmc: core: use kobj_to_dev() dt-bindings: mmc: sdhci-of-dwcmhsc: Add rk3588 mmc: core: Add CIDs for cards to the entropy pool mmc: core: Allows to override the timeout value for ioctl() path mmc: sdhci-omap: Use of_device_get_match_data() helper ...
Diffstat (limited to 'drivers/mmc/core/queue.c')
-rw-r--r--drivers/mmc/core/queue.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mmc/core/queue.c b/drivers/mmc/core/queue.c
index a3d446005571..fa5324ceeebe 100644
--- a/drivers/mmc/core/queue.c
+++ b/drivers/mmc/core/queue.c
@@ -190,6 +190,8 @@ static void mmc_queue_setup_discard(struct request_queue *q,
q->limits.discard_granularity = SECTOR_SIZE;
if (mmc_can_secure_erase_trim(card))
blk_queue_max_secure_erase_sectors(q, max_discard);
+ if (mmc_can_trim(card) && card->erased_byte == 0)
+ blk_queue_max_write_zeroes_sectors(q, max_discard);
}
static unsigned short mmc_get_max_segments(struct mmc_host *host)