From: Sujit Reddy Thumma <sthumma@codeaurora.org>
To: Per Forlin <per.forlin@stericsson.com>
Cc: linux-mmc@vger.kernel.org, ulf.hansson@stericsson.com,
Linus Walleij <linus.walleij@linaro.org>,
Chris Ball <cjb@laptop.org>
Subject: Re: [PATCH] mmc: mmc_test: align max_seg_size
Date: Thu, 17 Nov 2011 09:26:24 +0530 [thread overview]
Message-ID: <4EC485E8.4040706@codeaurora.org> (raw)
In-Reply-To: <1321268664-22006-1-git-send-email-per.forlin@stericsson.com>
On 11/14/2011 4:34 PM, Per Forlin wrote:
> 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>
> ---
> 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;
Shouldn't we align this to host->max_blk_size supported by controller? I
guess there are some extended capacity cards which claim to support
4096bytes as block size. I am not sure if any card/controller supports
this mode yet.
>
> t->max_tfr = t->max_sz;
> if (t->max_tfr>> 9> test->card->host->max_blk_count)
--
Thanks,
Sujit
next prev parent reply other threads:[~2011-11-17 3:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-14 11:04 [PATCH] mmc: mmc_test: align max_seg_size Per Forlin
2011-11-17 3:56 ` Sujit Reddy Thumma [this message]
2011-11-18 9:25 ` Per Förlin
2011-12-01 17:43 ` Chris Ball
2011-12-02 11:23 ` Sujit Reddy Thumma
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EC485E8.4040706@codeaurora.org \
--to=sthumma@codeaurora.org \
--cc=cjb@laptop.org \
--cc=linus.walleij@linaro.org \
--cc=linux-mmc@vger.kernel.org \
--cc=per.forlin@stericsson.com \
--cc=ulf.hansson@stericsson.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.