Skip to content

Commit fa700d7

Browse files
committed
mmc: Revert "mmc: core: Allow mmc_start_host() synchronously detect a card"
It has turned out that some mmc host drivers were not ready to deal with this change. Let's fix those host drivers first, then we can give this a new try. Fixes: 2cc83bf (mmc: core: Allow mmc_start_host() synchronously detect a card) Cc: Dennis Zhou <[email protected]> Reported-by: Geert Uytterhoeven <[email protected]> Reported-by: Biju Das <[email protected]> Signed-off-by: Ulf Hansson <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent e55e5df commit fa700d7

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

drivers/mmc/core/core.c

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2199,8 +2199,10 @@ int mmc_card_alternative_gpt_sector(struct mmc_card *card, sector_t *gpt_sector)
21992199
}
22002200
EXPORT_SYMBOL(mmc_card_alternative_gpt_sector);
22012201

2202-
static void __mmc_rescan(struct mmc_host *host)
2202+
void mmc_rescan(struct work_struct *work)
22032203
{
2204+
struct mmc_host *host =
2205+
container_of(work, struct mmc_host, detect.work);
22042206
int i;
22052207

22062208
if (host->rescan_disable)
@@ -2272,14 +2274,6 @@ static void __mmc_rescan(struct mmc_host *host)
22722274
mmc_schedule_delayed_work(&host->detect, HZ);
22732275
}
22742276

2275-
void mmc_rescan(struct work_struct *work)
2276-
{
2277-
struct mmc_host *host =
2278-
container_of(work, struct mmc_host, detect.work);
2279-
2280-
__mmc_rescan(host);
2281-
}
2282-
22832277
void mmc_start_host(struct mmc_host *host)
22842278
{
22852279
host->f_init = max(min(freqs[0], host->f_max), host->f_min);
@@ -2292,8 +2286,7 @@ void mmc_start_host(struct mmc_host *host)
22922286
}
22932287

22942288
mmc_gpiod_request_cd_irq(host);
2295-
host->detect_change = 1;
2296-
__mmc_rescan(host);
2289+
_mmc_detect_change(host, 0, false);
22972290
}
22982291

22992292
void __mmc_stop_host(struct mmc_host *host)

0 commit comments

Comments
 (0)