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

Commit f4a3ee01 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ufs: ufs-qcom: Fix data corruption issue with FBE on F2FS"

parents 5fc7f98a d88f6a59
Loading
Loading
Loading
Loading
+9 −10
Original line number Diff line number Diff line
@@ -897,18 +897,17 @@ static int ufs_qcom_crypto_req_setup(struct ufs_hba *hba,
		req = lrbp->cmd->request;
	else
		return 0;
	/*
	 * Right now ICE do not support variable dun but can be
	 * taken as future enhancement
	 * if (bio_dun(req->bio)) {
	 *      dun @bio can be split, so we have to adjust offset
	 *      *dun = bio_dun(req->bio);
	 * } else
	 */

	/* Use request LBA or given dun as the DUN value */
	if (req->bio) {
		if (bio_dun(req->bio)) {
			/* dun @bio can be split, so we have to adjust offset */
			*dun = bio_dun(req->bio);
		} else {
			*dun = req->bio->bi_iter.bi_sector;
			*dun >>= UFS_QCOM_ICE_TR_DATA_UNIT_4_KB;
		}
	}

	ret = ufs_qcom_ice_req_setup(host, lrbp->cmd, cc_index, enable);