Loading drivers/mmc/core/block.c +5 −1 Original line number Diff line number Diff line Loading @@ -2327,7 +2327,11 @@ enum mmc_issued mmc_blk_mq_issue_rq(struct mmc_queue *mq, struct request *req) } if (!ret) return MMC_REQ_STARTED; return ret == -EBUSY ? MMC_REQ_BUSY : MMC_REQ_FAILED_TO_START; if (ret == -EBUSY) return MMC_REQ_BUSY; return MMC_REQ_FAILED_TO_START; default: WARN_ON_ONCE(1); return MMC_REQ_FAILED_TO_START; Loading drivers/mmc/core/host.c +3 −1 Original line number Diff line number Diff line Loading @@ -153,7 +153,9 @@ int mmc_retune(struct mmc_host *host) else return 0; if (!host->need_retune || host->doing_retune || !host->card) if (!host->need_retune || host->doing_retune || !host->card || mmc_card_hs400es(host->card) || (host->ios.clock <= MMC_HIGH_DDR_MAX_DTR)) return 0; host->need_retune = 0; Loading drivers/mmc/host/cqhci.c +24 −2 Original line number Diff line number Diff line Loading @@ -305,6 +305,9 @@ static void __cqhci_enable(struct cqhci_host *cq_host) cqhci_writel(cq_host, cq_host->rca, CQHCI_SSC2); /* send QSR at lesser intervals than the default */ cqhci_writel(cq_host, SEND_QSR_INTERVAL, CQHCI_SSC1); cqhci_set_irqs(cq_host, 0); mmc->cqe_on = true; Loading Loading @@ -675,6 +678,7 @@ static int cqhci_request(struct mmc_host *mmc, struct mmc_request *mrq) if (cq_host->ops->crypto_cfg) { err = cq_host->ops->crypto_cfg(mmc, mrq, tag, &ice_ctx); if (err) { mmc->err_stats[MMC_ERR_ICE_CFG]++; pr_err("%s: failed to configure crypto: err %d tag %d\n", mmc_hostname(mmc), err, tag); goto out; Loading @@ -689,7 +693,7 @@ static int cqhci_request(struct mmc_host *mmc, struct mmc_request *mrq) if (err) { pr_err("%s: cqhci: failed to setup tx desc: %d\n", mmc_hostname(mmc), err); return err; goto end_crypto; } /* PM QoS */ sdhci_msm_pm_qos_irq_vote(host); Loading @@ -712,6 +716,10 @@ static int cqhci_request(struct mmc_host *mmc, struct mmc_request *mrq) /* Ensure the task descriptor list is flushed before ringing doorbell */ wmb(); if (cqhci_readl(cq_host, CQHCI_TDBR) & (1 << tag)) { cqhci_dumpregs(cq_host); BUG(); } mmc_log_string(mmc, "tag: %d\n", tag); cqhci_writel(cq_host, 1 << tag, CQHCI_TDBR); /* Commit the doorbell write immediately */ Loading @@ -724,6 +732,20 @@ static int cqhci_request(struct mmc_host *mmc, struct mmc_request *mrq) if (err) cqhci_post_req(mmc, mrq); goto out; end_crypto: if (cq_host->ops->crypto_cfg_end && mrq->data) { err = cq_host->ops->crypto_cfg_end(mmc, mrq); if (err) pr_err("%s: failed to end ice config: err %d tag %d\n", mmc_hostname(mmc), err, tag); } if (!(cq_host->caps & CQHCI_CAP_CRYPTO_SUPPORT) && cq_host->ops->crypto_cfg_reset && mrq->data) cq_host->ops->crypto_cfg_reset(mmc, tag); out: return err; } Loading Loading @@ -1047,7 +1069,7 @@ static bool cqhci_halt(struct mmc_host *mmc, unsigned int timeout) * layers will need to send a STOP command), so we set the timeout based on a * generous command timeout. */ #define CQHCI_START_HALT_TIMEOUT 5 #define CQHCI_START_HALT_TIMEOUT 5000 static void cqhci_recovery_start(struct mmc_host *mmc) { Loading drivers/mmc/host/cqhci.h +8 −2 Original line number Diff line number Diff line Loading @@ -95,6 +95,12 @@ /* send status config 2 */ #define CQHCI_SSC2 0x44 /* * Value n means CQE would send CMD13 during the transfer of data block * BLOCK_CNT-n */ #define SEND_QSR_INTERVAL 0x70001 /* response for dcmd */ #define CQHCI_CRDCT 0x48 Loading Loading @@ -234,7 +240,7 @@ struct cqhci_host_ops { static inline void cqhci_writel(struct cqhci_host *host, u32 val, int reg) { if (unlikely(host->ops->write_l)) if (unlikely(host->ops && host->ops->write_l)) host->ops->write_l(host, val, reg); else writel_relaxed(val, host->mmio + reg); Loading @@ -242,7 +248,7 @@ static inline void cqhci_writel(struct cqhci_host *host, u32 val, int reg) static inline u32 cqhci_readl(struct cqhci_host *host, int reg) { if (unlikely(host->ops->read_l)) if (unlikely(host->ops && host->ops->read_l)) return host->ops->read_l(host, reg); else return readl_relaxed(host->mmio + reg); Loading Loading
drivers/mmc/core/block.c +5 −1 Original line number Diff line number Diff line Loading @@ -2327,7 +2327,11 @@ enum mmc_issued mmc_blk_mq_issue_rq(struct mmc_queue *mq, struct request *req) } if (!ret) return MMC_REQ_STARTED; return ret == -EBUSY ? MMC_REQ_BUSY : MMC_REQ_FAILED_TO_START; if (ret == -EBUSY) return MMC_REQ_BUSY; return MMC_REQ_FAILED_TO_START; default: WARN_ON_ONCE(1); return MMC_REQ_FAILED_TO_START; Loading
drivers/mmc/core/host.c +3 −1 Original line number Diff line number Diff line Loading @@ -153,7 +153,9 @@ int mmc_retune(struct mmc_host *host) else return 0; if (!host->need_retune || host->doing_retune || !host->card) if (!host->need_retune || host->doing_retune || !host->card || mmc_card_hs400es(host->card) || (host->ios.clock <= MMC_HIGH_DDR_MAX_DTR)) return 0; host->need_retune = 0; Loading
drivers/mmc/host/cqhci.c +24 −2 Original line number Diff line number Diff line Loading @@ -305,6 +305,9 @@ static void __cqhci_enable(struct cqhci_host *cq_host) cqhci_writel(cq_host, cq_host->rca, CQHCI_SSC2); /* send QSR at lesser intervals than the default */ cqhci_writel(cq_host, SEND_QSR_INTERVAL, CQHCI_SSC1); cqhci_set_irqs(cq_host, 0); mmc->cqe_on = true; Loading Loading @@ -675,6 +678,7 @@ static int cqhci_request(struct mmc_host *mmc, struct mmc_request *mrq) if (cq_host->ops->crypto_cfg) { err = cq_host->ops->crypto_cfg(mmc, mrq, tag, &ice_ctx); if (err) { mmc->err_stats[MMC_ERR_ICE_CFG]++; pr_err("%s: failed to configure crypto: err %d tag %d\n", mmc_hostname(mmc), err, tag); goto out; Loading @@ -689,7 +693,7 @@ static int cqhci_request(struct mmc_host *mmc, struct mmc_request *mrq) if (err) { pr_err("%s: cqhci: failed to setup tx desc: %d\n", mmc_hostname(mmc), err); return err; goto end_crypto; } /* PM QoS */ sdhci_msm_pm_qos_irq_vote(host); Loading @@ -712,6 +716,10 @@ static int cqhci_request(struct mmc_host *mmc, struct mmc_request *mrq) /* Ensure the task descriptor list is flushed before ringing doorbell */ wmb(); if (cqhci_readl(cq_host, CQHCI_TDBR) & (1 << tag)) { cqhci_dumpregs(cq_host); BUG(); } mmc_log_string(mmc, "tag: %d\n", tag); cqhci_writel(cq_host, 1 << tag, CQHCI_TDBR); /* Commit the doorbell write immediately */ Loading @@ -724,6 +732,20 @@ static int cqhci_request(struct mmc_host *mmc, struct mmc_request *mrq) if (err) cqhci_post_req(mmc, mrq); goto out; end_crypto: if (cq_host->ops->crypto_cfg_end && mrq->data) { err = cq_host->ops->crypto_cfg_end(mmc, mrq); if (err) pr_err("%s: failed to end ice config: err %d tag %d\n", mmc_hostname(mmc), err, tag); } if (!(cq_host->caps & CQHCI_CAP_CRYPTO_SUPPORT) && cq_host->ops->crypto_cfg_reset && mrq->data) cq_host->ops->crypto_cfg_reset(mmc, tag); out: return err; } Loading Loading @@ -1047,7 +1069,7 @@ static bool cqhci_halt(struct mmc_host *mmc, unsigned int timeout) * layers will need to send a STOP command), so we set the timeout based on a * generous command timeout. */ #define CQHCI_START_HALT_TIMEOUT 5 #define CQHCI_START_HALT_TIMEOUT 5000 static void cqhci_recovery_start(struct mmc_host *mmc) { Loading
drivers/mmc/host/cqhci.h +8 −2 Original line number Diff line number Diff line Loading @@ -95,6 +95,12 @@ /* send status config 2 */ #define CQHCI_SSC2 0x44 /* * Value n means CQE would send CMD13 during the transfer of data block * BLOCK_CNT-n */ #define SEND_QSR_INTERVAL 0x70001 /* response for dcmd */ #define CQHCI_CRDCT 0x48 Loading Loading @@ -234,7 +240,7 @@ struct cqhci_host_ops { static inline void cqhci_writel(struct cqhci_host *host, u32 val, int reg) { if (unlikely(host->ops->write_l)) if (unlikely(host->ops && host->ops->write_l)) host->ops->write_l(host, val, reg); else writel_relaxed(val, host->mmio + reg); Loading @@ -242,7 +248,7 @@ static inline void cqhci_writel(struct cqhci_host *host, u32 val, int reg) static inline u32 cqhci_readl(struct cqhci_host *host, int reg) { if (unlikely(host->ops->read_l)) if (unlikely(host->ops && host->ops->read_l)) return host->ops->read_l(host, reg); else return readl_relaxed(host->mmio + reg); Loading