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

Commit 739c69c9 authored by Per Forlin's avatar Per Forlin Committed by Chris Ball
Browse files

mmc: mmc_test: align max_seg_size



If max_seg_size is unaligned, mmc_test_map_sg() may create sg element
sizes that are not aligned with 512 byte. Fix, align max_seg_size at
mmc_test_area_init().

Signed-off-by: default avatarPer Forlin <per.forlin@stericsson.com>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent 5a092627
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1581,6 +1581,7 @@ static int mmc_test_area_init(struct mmc_test_card *test, int erase, int fill)

	t->max_segs = test->card->host->max_segs;
	t->max_seg_sz = test->card->host->max_seg_size;
	t->max_seg_sz -= t->max_seg_sz % 512;

	t->max_tfr = t->max_sz;
	if (t->max_tfr >> 9 > test->card->host->max_blk_count)