diff --git a/drivers/mmc/core/queue.c b/drivers/mmc/core/queue.c index ecc794323729..ba338d2a1c00 100644 --- a/drivers/mmc/core/queue.c +++ b/drivers/mmc/core/queue.c @@ -437,6 +437,9 @@ int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card, /* hook for pm qos cmdq init */ if (card->host->cmdq_ops->init) card->host->cmdq_ops->init(card->host); + if (host->cmdq_ops->cqe_crypto_update_queue) + host->cmdq_ops->cqe_crypto_update_queue(host, + mq->queue); mq->thread = kthread_run(mmc_cmdq_thread, mq, "mmc-cmdqd/%d%s", host->index, diff --git a/drivers/mmc/host/cmdq_hci.c b/drivers/mmc/host/cmdq_hci.c index 87c1cb7abf39..f1e4ba86f5d4 100644 --- a/drivers/mmc/host/cmdq_hci.c +++ b/drivers/mmc/host/cmdq_hci.c @@ -1277,6 +1277,12 @@ static int cmdq_late_init(struct mmc_host *mmc) return 0; } +static void cqhci_crypto_update_queue(struct mmc_host *mmc, + struct request_queue *queue) +{ + //struct cqhci_host *cq_host = mmc->cqe_private; +} + static const struct mmc_cmdq_host_ops cmdq_host_ops = { .init = cmdq_late_init, .enable = cmdq_enable, @@ -1286,6 +1292,7 @@ static const struct mmc_cmdq_host_ops cmdq_host_ops = { .halt = cmdq_halt, .reset = cmdq_reset, .dumpstate = cmdq_dumpstate, + .cqe_crypto_update_queue = cqhci_crypto_update_queue, }; struct cmdq_host *cmdq_pltfm_init(struct platform_device *pdev) diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 3c2b261b9c79..ab2c6af4dca1 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -122,6 +122,13 @@ struct mmc_cmdq_host_ops { int (*halt)(struct mmc_host *host, bool halt); void (*reset)(struct mmc_host *host, bool soft); void (*dumpstate)(struct mmc_host *host); + /* + * Update the request queue with keyslot manager details. This keyslot + * manager will be used by block crypto to configure the crypto Engine + * for data encryption. + */ + void (*cqe_crypto_update_queue)(struct mmc_host *host, + struct request_queue *queue); }; struct mmc_host_ops {