diff options
author | Per Forlin <per.forlin@stericsson.com> | 2011-11-14 12:04:24 +0100 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2012-01-11 23:58:41 -0500 |
commit | 739c69c964fb4c040df451ef2e4cd6ea4f8b8e2d (patch) | |
tree | deee953fce0ce8e01438301f863685c1be89d7a5 /drivers/mmc | |
parent | 5a09262744a0b84719b933ac66801de058776755 (diff) | |
download | kernel_goldelico_gta04-739c69c964fb4c040df451ef2e4cd6ea4f8b8e2d.zip kernel_goldelico_gta04-739c69c964fb4c040df451ef2e4cd6ea4f8b8e2d.tar.gz kernel_goldelico_gta04-739c69c964fb4c040df451ef2e4cd6ea4f8b8e2d.tar.bz2 |
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: Per Forlin <per.forlin@stericsson.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/card/mmc_test.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_test.c index b038c4a..5848998 100644 --- a/drivers/mmc/card/mmc_test.c +++ b/drivers/mmc/card/mmc_test.c @@ -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) |