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

Commit 4f3aa354 authored by Pradeep P V K's avatar Pradeep P V K Committed by Blagovest Kolenichev
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 46eeb436
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -402,6 +402,9 @@ static void mmc_setup_queue(struct mmc_queue *mq, struct mmc_card *card)
	mutex_init(&mq->complete_lock);

	init_waitqueue_head(&mq->wait);

	if (host->cqe_ops->cqe_crypto_update_queue)
		host->cqe_ops->cqe_crypto_update_queue(host, mq->queue);
}

static int mmc_mq_init_queue(struct mmc_queue *mq, int q_depth,
+7 −0
Original line number Diff line number Diff line
@@ -694,6 +694,12 @@ static int cqhci_request(struct mmc_host *mmc, struct mmc_request *mrq)
	return err;
}

static void cqhci_crypto_update_queue(struct mmc_host *mmc,
					struct request_queue *queue)
{
	//struct cqhci_host *cq_host = mmc->cqe_private;
}

static void cqhci_recovery_needed(struct mmc_host *mmc, struct mmc_request *mrq,
				  bool notify)
{
@@ -1156,6 +1162,7 @@ static const struct mmc_cqe_ops cqhci_cqe_ops = {
	.cqe_timeout = cqhci_timeout,
	.cqe_recovery_start = cqhci_recovery_start,
	.cqe_recovery_finish = cqhci_recovery_finish,
	.cqe_crypto_update_queue = cqhci_crypto_update_queue,
};

struct cqhci_host *cqhci_pltfm_init(struct platform_device *pdev)
+7 −0
Original line number Diff line number Diff line
@@ -260,6 +260,13 @@ struct mmc_cqe_ops {
	 * will have zero data bytes transferred.
	 */
	void	(*cqe_recovery_finish)(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_async_req {