Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'mmc-v5.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc

Pull MMC fixes from Ulf Hansson:
"A couple of MMC fixes intended for v5.0-rc7.

MMC core:
- Fix deadlock bug for block I/O requests

MMC host:
- sunxi: Disable broken HS-DDR mode for H5 by default
- sunxi: Avoid unsupported speed modes declared via DT
- meson-gx: Restore interrupt name"

* tag 'mmc-v5.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
mmc: meson-gx: fix interrupt name
mmc: block: handle complete_work on separate workqueue
mmc: sunxi: Filter out unsupported modes declared in the device tree
mmc: sunxi: Disable HS-DDR mode for H5 eMMC controller by default

+37 -3
+9 -1
drivers/mmc/core/block.c
··· 2112 2112 if (waiting) 2113 2113 wake_up(&mq->wait); 2114 2114 else 2115 - kblockd_schedule_work(&mq->complete_work); 2115 + queue_work(mq->card->complete_wq, &mq->complete_work); 2116 2116 2117 2117 return; 2118 2118 } ··· 2924 2924 2925 2925 mmc_fixup_device(card, mmc_blk_fixups); 2926 2926 2927 + card->complete_wq = alloc_workqueue("mmc_complete", 2928 + WQ_MEM_RECLAIM | WQ_HIGHPRI, 0); 2929 + if (unlikely(!card->complete_wq)) { 2930 + pr_err("Failed to create mmc completion workqueue"); 2931 + return -ENOMEM; 2932 + } 2933 + 2927 2934 md = mmc_blk_alloc(card); 2928 2935 if (IS_ERR(md)) 2929 2936 return PTR_ERR(md); ··· 2994 2987 pm_runtime_put_noidle(&card->dev); 2995 2988 mmc_blk_remove_req(md); 2996 2989 dev_set_drvdata(&card->dev, NULL); 2990 + destroy_workqueue(card->complete_wq); 2997 2991 } 2998 2992 2999 2993 static int _mmc_blk_suspend(struct mmc_card *card)
+2 -1
drivers/mmc/host/meson-gx-mmc.c
··· 1338 1338 host->regs + SD_EMMC_IRQ_EN); 1339 1339 1340 1340 ret = request_threaded_irq(host->irq, meson_mmc_irq, 1341 - meson_mmc_irq_thread, IRQF_SHARED, NULL, host); 1341 + meson_mmc_irq_thread, IRQF_SHARED, 1342 + dev_name(&pdev->dev), host); 1342 1343 if (ret) 1343 1344 goto err_init_clk; 1344 1345
+25 -1
drivers/mmc/host/sunxi-mmc.c
··· 1399 1399 mmc->caps |= MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED | 1400 1400 MMC_CAP_ERASE | MMC_CAP_SDIO_IRQ; 1401 1401 1402 - if (host->cfg->clk_delays || host->use_new_timings) 1402 + /* 1403 + * Some H5 devices do not have signal traces precise enough to 1404 + * use HS DDR mode for their eMMC chips. 1405 + * 1406 + * We still enable HS DDR modes for all the other controller 1407 + * variants that support them. 1408 + */ 1409 + if ((host->cfg->clk_delays || host->use_new_timings) && 1410 + !of_device_is_compatible(pdev->dev.of_node, 1411 + "allwinner,sun50i-h5-emmc")) 1403 1412 mmc->caps |= MMC_CAP_1_8V_DDR | MMC_CAP_3_3V_DDR; 1404 1413 1405 1414 ret = mmc_of_parse(mmc); 1406 1415 if (ret) 1407 1416 goto error_free_dma; 1417 + 1418 + /* 1419 + * If we don't support delay chains in the SoC, we can't use any 1420 + * of the higher speed modes. Mask them out in case the device 1421 + * tree specifies the properties for them, which gets added to 1422 + * the caps by mmc_of_parse() above. 1423 + */ 1424 + if (!(host->cfg->clk_delays || host->use_new_timings)) { 1425 + mmc->caps &= ~(MMC_CAP_3_3V_DDR | MMC_CAP_1_8V_DDR | 1426 + MMC_CAP_1_2V_DDR | MMC_CAP_UHS); 1427 + mmc->caps2 &= ~MMC_CAP2_HS200; 1428 + } 1429 + 1430 + /* TODO: This driver doesn't support HS400 mode yet */ 1431 + mmc->caps2 &= ~MMC_CAP2_HS400; 1408 1432 1409 1433 ret = sunxi_mmc_init_host(host); 1410 1434 if (ret)
+1
include/linux/mmc/card.h
··· 308 308 unsigned int nr_parts; 309 309 310 310 unsigned int bouncesz; /* Bounce buffer size */ 311 + struct workqueue_struct *complete_wq; /* Private workqueue */ 311 312 }; 312 313 313 314 static inline bool mmc_large_sector(struct mmc_card *card)