diff options
author | NeilBrown <neilb@suse.de> | 2014-11-11 22:55:19 -0500 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2014-11-26 08:30:59 -0500 |
commit | 006fc51cb3ab42960fa4f246c772ad12e45a3a9b (patch) | |
tree | 8e0df6c55a6cc8cc11e2061f07f14f35360f3fc7 /drivers/mmc | |
parent | 59b6c9e0ad9f2578ff8b2ef8c718bcb8b895fefb (diff) |
mmc: core: reset sdio card properly on resume.
mmc_sdio_power_restore() calls
mmc_send_if_cond(host, host->card->ocr);
ret = mmc_send_io_op_cond(host, 0, NULL);
between mmc_go_idle() and mmc_sdio_init_card().
mmc_sdio_resume() needs to as well, else my libertas sdio wifi
device doesn't resume properly from suspend.
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/core/sdio.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c index f0ddb0d28536..fd0750b5a634 100644 --- a/drivers/mmc/core/sdio.c +++ b/drivers/mmc/core/sdio.c | |||
@@ -980,8 +980,12 @@ static int mmc_sdio_resume(struct mmc_host *host) | |||
980 | if (mmc_card_is_removable(host) || !mmc_card_keep_power(host)) { | 980 | if (mmc_card_is_removable(host) || !mmc_card_keep_power(host)) { |
981 | sdio_reset(host); | 981 | sdio_reset(host); |
982 | mmc_go_idle(host); | 982 | mmc_go_idle(host); |
983 | err = mmc_sdio_init_card(host, host->card->ocr, host->card, | 983 | mmc_send_if_cond(host, host->card->ocr); |
984 | mmc_card_keep_power(host)); | 984 | err = mmc_send_io_op_cond(host, 0, NULL); |
985 | if (!err) | ||
986 | err = mmc_sdio_init_card(host, host->card->ocr, | ||
987 | host->card, | ||
988 | mmc_card_keep_power(host)); | ||
985 | } else if (mmc_card_keep_power(host) && mmc_card_wake_sdio_irq(host)) { | 989 | } else if (mmc_card_keep_power(host) && mmc_card_wake_sdio_irq(host)) { |
986 | /* We may have switched to 1-bit mode during suspend */ | 990 | /* We may have switched to 1-bit mode during suspend */ |
987 | err = sdio_enable_4bit_bus(host->card); | 991 | err = sdio_enable_4bit_bus(host->card); |