Hi Arjan, These 4 patches set a suitable max_discard_sectors value for mmc queue which will be used for ERASE/TRIM. Right now the max_discard_sectors value is UINT_MAX which allows kernel block layer pass down unlimited number of ERASE/TRIM sectors one time. For MFLD sdhci host controller, erasing so much sectors one time need much long time. So, set a suitable max_discard_sectors value for mmc queue which can let host controller erase many sectors during a proper timeout time.
patch1: removed unused code in block.c and queue.c patch2: calculated a suitable timeout time for SDHCI host controller. Each erase cmd should be finished within the timeout time. patch3: 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. patch4: implemented get_tmclk callback for SDHCI host controller. Regards Chuanxiao _______________________________________________ MeeGo-kernel mailing list [email protected] http://lists.meego.com/listinfo/meego-kernel
