Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0d55bf07 authored by Ankit Jain's avatar Ankit Jain Committed by Gerrit - the friendly Code Review server
Browse files

mmc: core: add mmc flush detect work.



Block device should be available before mounting of
root device. In some cases block device is not available
at the time of root device mounting because mmc detect
work is not completed by that time which is causing mount
failure. To fix this, flush mmc detect work after device
probe completion.

Change-Id: I785a1e01a691652cfdb5a82acee2475e23fe3766
Signed-off-by: default avatarAnkit Jain <jankit@codeaurora.org>
parent 902b1499
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -4360,6 +4360,18 @@ int mmc_detect_card_removed(struct mmc_host *host)
}
EXPORT_SYMBOL(mmc_detect_card_removed);

/*
 * This should be called to make sure that detect work(mmc_rescan)
 * is completed.Drivers may use this function from async schedule/probe
 * contexts to make sure that the bootdevice detection is completed on
 * completion of async_schedule.
 */
void mmc_flush_detect_work(struct mmc_host *host)
{
	flush_delayed_work(&host->detect);
}
EXPORT_SYMBOL(mmc_flush_detect_work);

void mmc_rescan(struct work_struct *work)
{
	unsigned long flags;
+1 −0
Original line number Diff line number Diff line
@@ -180,6 +180,7 @@ extern int mmc_send_tuning(struct mmc_host *host, u32 opcode, int *cmd_error);
extern int mmc_get_ext_csd(struct mmc_card *card, u8 **new_ext_csd);
extern int mmc_set_auto_bkops(struct mmc_card *card, bool enable);
extern int mmc_suspend_clk_scaling(struct mmc_host *host);
extern void mmc_flush_detect_work(struct mmc_host *host);

#define MMC_ERASE_ARG		0x00000000
#define MMC_SECURE_ERASE_ARG	0x80000000