Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ffc41530 authored by Pradeep P V K's avatar Pradeep P V K Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarPradeep P V K <ppvk@codeaurora.org>
parent e62b481e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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,
+7 −0
Original line number Diff line number Diff line
@@ -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)
+7 −0
Original line number Diff line number Diff line
@@ -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 {