mmc: host: Use request queue pointer for mmc crypto

To use block crypto based inline encryption mechanism
storage device driver should create a keyslot manager
and register it with device request queue. To achieve this
pass request queue pointer during host controller initialization
where request queue can be updated with keyslot manager.

Change-Id: I71f0005a1ad8867b6210e92878b8c112d436688e
Signed-off-by: Pradeep P V K <ppvk@codeaurora.org>
tirimbino
Pradeep P V K 4 years ago committed by Gerrit - the friendly Code Review server
parent e62b481e0f
commit ffc41530ad
  1. 3
      drivers/mmc/core/queue.c
  2. 7
      drivers/mmc/host/cmdq_hci.c
  3. 7
      include/linux/mmc/host.h

@ -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,

@ -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)

@ -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 {

Loading…
Cancel
Save