Skip to content

mmc: set a suitable max discard sectors value for host controller

Chuanxiao.Dong linux-mmc 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3Add erase timeout calculation routine for sdhci hostdrivers/mmc/core/core.c drivers/mmc/host/sdhci.c+50 -04 replies
2/3set a suitable max_discard_sectors value for mmc queuedrivers/mmc/card/queue.c drivers/mmc/core/core.c include/linux/mmc/core.h +1 more+127 -300 replies
3/3implemented get_tmclk callback for SDHCI hostdrivers/mmc/host/sdhci.c+17 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH v1 0/3]mmc: set a suitable max discard sectors value for host controller

Hi Chris,
These 3 patches set a suitable max_discard_sectors value for mmc queue which will be used for ERASE/TRIM. Add Adrian in Cc loop since he implemented the ERASE/TRIM feature for MMC driver.

patch1: calculated a suitable timeout time for SDHCI host controller. Each erase cmd should be finished within the timeout time.

patch2: calculated a suitable max_discard_sectors value for mmc queue. Since some SDHCI host controller cannot process the whole sectors at one time. In this patch, a new callback get_tmclk in mmc_host_ops was added to help core layer to calculate the max value. If this callback was implemented, core layer will calculted a suitable value. If not, the max_discard_sectors value will be the same as before.

patch3: implemented get_tmclk callback for SDHCI host controller.

Adrian, hope I can get your comment about these patches as well. Thanks for your time to review these patches.

Regards
Chuanxiao