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

Commit 495ff45e authored by Veerabhadrarao Badiganti's avatar Veerabhadrarao Badiganti
Browse files

mmc: card: Set INLINECRYPT queue flag based on host capability



Set INLINECRYPT queue flag if the host can support h/w based inline
encryption.

This is needed to let the filesystem know that underlying storage
device can support inline encryption so that data encryption/
decryption would be handled at h/w level, not at filesystem.

Change-Id: Iad029439b0867d5bfbd04e2474a71421ab3f3cf4
Signed-off-by: default avatarVeerabhadrarao Badiganti <vbadigan@codeaurora.org>
parent 36c6512e
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -314,6 +314,8 @@ void mmc_cmdq_setup_queue(struct mmc_queue *mq, struct mmc_card *card)
						host->max_req_size / 512));
	blk_queue_max_segment_size(mq->queue, host->max_seg_size);
	blk_queue_max_segments(mq->queue, host->max_segs);
	if (host->inlinecrypt_support)
		queue_flag_set_unlocked(QUEUE_FLAG_INLINECRYPT, mq->queue);
}

/**
@@ -483,6 +485,9 @@ int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card,
success:
	sema_init(&mq->thread_sem, 1);

	if (host->inlinecrypt_support)
		queue_flag_set_unlocked(QUEUE_FLAG_INLINECRYPT, mq->queue);

	/* hook for pm qos legacy init */
	if (card->host->ops->init)
		card->host->ops->init(card->host);
+2 −0
Original line number Diff line number Diff line
@@ -652,6 +652,8 @@ struct mmc_host {
	void *cmdq_private;
	struct mmc_request	*err_mrq;

	bool inlinecrypt_support;  /* Inline encryption support */

	atomic_t rpmb_req_pending;
	struct mutex		rpmb_req_mutex;
	unsigned long		private[0] ____cacheline_aligned;