Skip to content

Commit

Permalink
Merge tag 'mmc-v6.5-2' of git://git.kernel.org/pub/scm/linux/kernel/g…
Browse files Browse the repository at this point in the history
…it/ulfh/mmc

Pull mmc fix from Ulf Hansson:

 - Fix regression of detection of eMMC/SD/SDIO cards

* tag 'mmc-v6.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
  mmc: Revert "mmc: core: Allow mmc_start_host() synchronously detect a card"
  • Loading branch information
torvalds committed Jul 7, 2023
2 parents 4c8ab06 + fa700d7 commit 8689f4f
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions drivers/mmc/core/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2199,8 +2199,10 @@ int mmc_card_alternative_gpt_sector(struct mmc_card *card, sector_t *gpt_sector)
}
EXPORT_SYMBOL(mmc_card_alternative_gpt_sector);

static void __mmc_rescan(struct mmc_host *host)
void mmc_rescan(struct work_struct *work)
{
struct mmc_host *host =
container_of(work, struct mmc_host, detect.work);
int i;

if (host->rescan_disable)
Expand Down Expand Up @@ -2272,14 +2274,6 @@ static void __mmc_rescan(struct mmc_host *host)
mmc_schedule_delayed_work(&host->detect, HZ);
}

void mmc_rescan(struct work_struct *work)
{
struct mmc_host *host =
container_of(work, struct mmc_host, detect.work);

__mmc_rescan(host);
}

void mmc_start_host(struct mmc_host *host)
{
host->f_init = max(min(freqs[0], host->f_max), host->f_min);
Expand All @@ -2292,8 +2286,7 @@ void mmc_start_host(struct mmc_host *host)
}

mmc_gpiod_request_cd_irq(host);
host->detect_change = 1;
__mmc_rescan(host);
_mmc_detect_change(host, 0, false);
}

void __mmc_stop_host(struct mmc_host *host)
Expand Down

0 comments on commit 8689f4f

Please sign in to comment.