diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-12-22 10:13:04 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-12-22 10:13:04 -0800 |
commit | 8d86cf8879e374fb395f6b15150dd702275ca989 (patch) | |
tree | 0cbd8f74f8422ebac04b84fdf6fd4032f2d5e449 /drivers/mmc/core/sd.c | |
parent | 67327145c4af673d9c4ef06537ca8c5818f97668 (diff) | |
parent | e85baa8868b016513c0f5738362402495b1a66a5 (diff) |
Merge tag 'mmc-v4.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc
Pull MMC fixes from Ulf Hansson:
"MMC core:
- further fix thread wake-up for requests
- use a bounce buffer to fix DMA issue for SSR register read
MMC host:
- sdhci: Fix a regression for runtime PM
- sdhci-cadence: Add a proper SoC specific DT compatible"
* tag 'mmc-v4.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
mmc: sd: Meet alignment requirements for raw_ssr DMA
mmc: core: Further fix thread wake-up
mmc: sdhci: Fix to handle MMC_POWER_UNDEFINED
mmc: sdhci-cadence: add Socionext UniPhier specific compatible string
Diffstat (limited to 'drivers/mmc/core/sd.c')
-rw-r--r-- | drivers/mmc/core/sd.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c index deb90c2ff6b42..a614f37faf27e 100644 --- a/drivers/mmc/core/sd.c +++ b/drivers/mmc/core/sd.c @@ -223,6 +223,7 @@ static int mmc_decode_scr(struct mmc_card *card) static int mmc_read_ssr(struct mmc_card *card) { unsigned int au, es, et, eo; + u32 *raw_ssr; int i; if (!(card->csd.cmdclass & CCC_APP_SPEC)) { @@ -231,14 +232,21 @@ static int mmc_read_ssr(struct mmc_card *card) return 0; } - if (mmc_app_sd_status(card, card->raw_ssr)) { + raw_ssr = kmalloc(sizeof(card->raw_ssr), GFP_KERNEL); + if (!raw_ssr) + return -ENOMEM; + + if (mmc_app_sd_status(card, raw_ssr)) { pr_warn("%s: problem reading SD Status register\n", mmc_hostname(card->host)); + kfree(raw_ssr); return 0; } for (i = 0; i < 16; i++) - card->raw_ssr[i] = be32_to_cpu(card->raw_ssr[i]); + card->raw_ssr[i] = be32_to_cpu(raw_ssr[i]); + + kfree(raw_ssr); /* * UNSTUFF_BITS only works with four u32s so we have to offset the |