mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 11:33:28 +02:00
MMC core:
- Fix error propagation for the non-block-device I/O paths MMC host: - sdhci-cadence: Fix an error path during probe - sdhci-esdhc-imx: Fix support for the "no-mmc-hs400" DT property -----BEGIN PGP SIGNATURE----- iQJLBAABCgA1FiEEugLDXPmKSktSkQsV/iaEJXNYjCkFAmRt0GQXHHVsZi5oYW5z c29uQGxpbmFyby5vcmcACgkQ/iaEJXNYjCnH2Q//VDjF3KnCd/vEk+QJGwIMtnuc t0WzQNee6b0l9kGpHGNRzfGb/fnvi+Lzse8E7BAzkDhsyEXaP1OUelelHgclR6ek JtrclumPwTVLhCSHjyQcbdVN1toXvCIkiB3R3LM9lG7Ps06wmtJLcLq5ZTQ++q8S gCa73HC+2oUoV3ojyt2G4/4ZhW0alYrY1uuB/9sLdunwyWP8k8v88slUTGttK+TY PLvqfXThHHIuge19GzpkejwLU/L30cRbk+DFcgRm7DTeztIjfdkvLSxrUyPk15d7 lc+QIRbFuERU34WQWTEPCEdJ5e3/tXkX/pIoZZEzYfDUSF6Nu0n/KqnTpMgOWRYK LJaDlACZqXm6uEpMiMt8dqI4Zlx9fSfNVCshSi3iLRM/hZ5iFX04P3na7RRIv8a3 96tZ5U6WPRMV8sqakKlRgq8p32/GqWrjar3wex5wPzd0zqRtaLmqueWgx0hp2NJl 1fHS6ZYeGKTfOOeVbJIzm/PmBEIhK4H9HqVdbztJZlDkBsu44dTESWdMRdlvvv6v 1o/oZb5umNl083yh1AJpbLCfwN4ISMLQXTOh8NolB9uCtyprZDeGANZV7LE4cnAo hS7OCCI/ubf7CNNK+rN6LwiD91A2fOqoKUaNtTy2z38gSzRQJ8vNzfdBD8XxZQDT mDRTmE2mYEa6g3XNrr4= =PkZ2 -----END PGP SIGNATURE----- Merge tag 'mmc-v6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: "MMC core: - Fix error propagation for the non-block-device I/O paths MMC host: - sdhci-cadence: Fix an error path during probe - sdhci-esdhc-imx: Fix support for the 'no-mmc-hs400' DT property" * tag 'mmc-v6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: sdhci-esdhc-imx: make "no-mmc-hs400" works mmc: sdhci-cadence: Fix an error handling path in sdhci_cdns_probe() mmc: block: ensure error propagation for non-blk
This commit is contained in:
commit
203fc3177d
|
|
@ -264,6 +264,7 @@ static ssize_t power_ro_lock_store(struct device *dev,
|
|||
goto out_put;
|
||||
}
|
||||
req_to_mmc_queue_req(req)->drv_op = MMC_DRV_OP_BOOT_WP;
|
||||
req_to_mmc_queue_req(req)->drv_op_result = -EIO;
|
||||
blk_execute_rq(req, false);
|
||||
ret = req_to_mmc_queue_req(req)->drv_op_result;
|
||||
blk_mq_free_request(req);
|
||||
|
|
@ -651,6 +652,7 @@ static int mmc_blk_ioctl_cmd(struct mmc_blk_data *md,
|
|||
idatas[0] = idata;
|
||||
req_to_mmc_queue_req(req)->drv_op =
|
||||
rpmb ? MMC_DRV_OP_IOCTL_RPMB : MMC_DRV_OP_IOCTL;
|
||||
req_to_mmc_queue_req(req)->drv_op_result = -EIO;
|
||||
req_to_mmc_queue_req(req)->drv_op_data = idatas;
|
||||
req_to_mmc_queue_req(req)->ioc_count = 1;
|
||||
blk_execute_rq(req, false);
|
||||
|
|
@ -722,6 +724,7 @@ static int mmc_blk_ioctl_multi_cmd(struct mmc_blk_data *md,
|
|||
}
|
||||
req_to_mmc_queue_req(req)->drv_op =
|
||||
rpmb ? MMC_DRV_OP_IOCTL_RPMB : MMC_DRV_OP_IOCTL;
|
||||
req_to_mmc_queue_req(req)->drv_op_result = -EIO;
|
||||
req_to_mmc_queue_req(req)->drv_op_data = idata;
|
||||
req_to_mmc_queue_req(req)->ioc_count = n;
|
||||
blk_execute_rq(req, false);
|
||||
|
|
@ -2806,6 +2809,7 @@ static int mmc_dbg_card_status_get(void *data, u64 *val)
|
|||
if (IS_ERR(req))
|
||||
return PTR_ERR(req);
|
||||
req_to_mmc_queue_req(req)->drv_op = MMC_DRV_OP_GET_CARD_STATUS;
|
||||
req_to_mmc_queue_req(req)->drv_op_result = -EIO;
|
||||
blk_execute_rq(req, false);
|
||||
ret = req_to_mmc_queue_req(req)->drv_op_result;
|
||||
if (ret >= 0) {
|
||||
|
|
@ -2844,6 +2848,7 @@ static int mmc_ext_csd_open(struct inode *inode, struct file *filp)
|
|||
goto out_free;
|
||||
}
|
||||
req_to_mmc_queue_req(req)->drv_op = MMC_DRV_OP_GET_EXT_CSD;
|
||||
req_to_mmc_queue_req(req)->drv_op_result = -EIO;
|
||||
req_to_mmc_queue_req(req)->drv_op_data = &ext_csd;
|
||||
blk_execute_rq(req, false);
|
||||
err = req_to_mmc_queue_req(req)->drv_op_result;
|
||||
|
|
|
|||
|
|
@ -540,9 +540,11 @@ static int sdhci_cdns_probe(struct platform_device *pdev)
|
|||
|
||||
if (host->mmc->caps & MMC_CAP_HW_RESET) {
|
||||
priv->rst_hw = devm_reset_control_get_optional_exclusive(dev, NULL);
|
||||
if (IS_ERR(priv->rst_hw))
|
||||
return dev_err_probe(mmc_dev(host->mmc), PTR_ERR(priv->rst_hw),
|
||||
"reset controller error\n");
|
||||
if (IS_ERR(priv->rst_hw)) {
|
||||
ret = dev_err_probe(mmc_dev(host->mmc), PTR_ERR(priv->rst_hw),
|
||||
"reset controller error\n");
|
||||
goto free;
|
||||
}
|
||||
if (priv->rst_hw)
|
||||
host->mmc_host_ops.card_hw_reset = sdhci_cdns_mmc_hw_reset;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1634,6 +1634,10 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* HS400/HS400ES require 8 bit bus */
|
||||
if (!(host->mmc->caps & MMC_CAP_8_BIT_DATA))
|
||||
host->mmc->caps2 &= ~(MMC_CAP2_HS400 | MMC_CAP2_HS400_ES);
|
||||
|
||||
if (mmc_gpio_get_cd(host->mmc) >= 0)
|
||||
host->quirks &= ~SDHCI_QUIRK_BROKEN_CARD_DETECTION;
|
||||
|
||||
|
|
@ -1724,10 +1728,6 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
|
|||
host->mmc_host_ops.init_card = usdhc_init_card;
|
||||
}
|
||||
|
||||
err = sdhci_esdhc_imx_probe_dt(pdev, host, imx_data);
|
||||
if (err)
|
||||
goto disable_ahb_clk;
|
||||
|
||||
if (imx_data->socdata->flags & ESDHC_FLAG_MAN_TUNING)
|
||||
sdhci_esdhc_ops.platform_execute_tuning =
|
||||
esdhc_executing_tuning;
|
||||
|
|
@ -1735,15 +1735,13 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
|
|||
if (imx_data->socdata->flags & ESDHC_FLAG_ERR004536)
|
||||
host->quirks |= SDHCI_QUIRK_BROKEN_ADMA;
|
||||
|
||||
if (host->mmc->caps & MMC_CAP_8_BIT_DATA &&
|
||||
imx_data->socdata->flags & ESDHC_FLAG_HS400)
|
||||
if (imx_data->socdata->flags & ESDHC_FLAG_HS400)
|
||||
host->mmc->caps2 |= MMC_CAP2_HS400;
|
||||
|
||||
if (imx_data->socdata->flags & ESDHC_FLAG_BROKEN_AUTO_CMD23)
|
||||
host->quirks2 |= SDHCI_QUIRK2_ACMD23_BROKEN;
|
||||
|
||||
if (host->mmc->caps & MMC_CAP_8_BIT_DATA &&
|
||||
imx_data->socdata->flags & ESDHC_FLAG_HS400_ES) {
|
||||
if (imx_data->socdata->flags & ESDHC_FLAG_HS400_ES) {
|
||||
host->mmc->caps2 |= MMC_CAP2_HS400_ES;
|
||||
host->mmc_host_ops.hs400_enhanced_strobe =
|
||||
esdhc_hs400_enhanced_strobe;
|
||||
|
|
@ -1765,6 +1763,10 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
|
|||
goto disable_ahb_clk;
|
||||
}
|
||||
|
||||
err = sdhci_esdhc_imx_probe_dt(pdev, host, imx_data);
|
||||
if (err)
|
||||
goto disable_ahb_clk;
|
||||
|
||||
sdhci_esdhc_imx_hwinit(host);
|
||||
|
||||
err = sdhci_add_host(host);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user