From: Adrian Hunter <adrian.hunter@intel.com>
To: Ulf Hansson <ulf.hansson@linaro.org>, Chris Ball <chris@printf.net>
Cc: linux-mmc <linux-mmc@vger.kernel.org>
Subject: [PATCH 15/15] mmc: mmc_test: Extend "Badly aligned" tests for 8-byte alignment
Date: Tue, 21 Oct 2014 12:26:25 +0300 [thread overview]
Message-ID: <1413883585-16299-16-git-send-email-adrian.hunter@intel.com> (raw)
In-Reply-To: <1413883585-16299-1-git-send-email-adrian.hunter@intel.com>
The "Badly aligned" tests, test reading/writing with alignments
of 1,2 and 3. SDHCI now has 64-bit ADMA which has 8-byte
alignment, so extend the tests to test up to 7.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
---
drivers/mmc/card/mmc_test.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_test.c
index 0c0fc52..d7f986b 100644
--- a/drivers/mmc/card/mmc_test.c
+++ b/drivers/mmc/card/mmc_test.c
@@ -32,6 +32,8 @@
#define BUFFER_ORDER 2
#define BUFFER_SIZE (PAGE_SIZE << BUFFER_ORDER)
+#define TEST_ALIGN_END 8
+
/*
* Limit the test area size to the maximum MMC HC erase group size. Note that
* the maximum SD allocation unit size is just 4MiB.
@@ -1174,7 +1176,7 @@ static int mmc_test_align_write(struct mmc_test_card *test)
int ret, i;
struct scatterlist sg;
- for (i = 1;i < 4;i++) {
+ for (i = 1; i < TEST_ALIGN_END; i++) {
sg_init_one(&sg, test->buffer + i, 512);
ret = mmc_test_transfer(test, &sg, 1, 0, 1, 512, 1);
if (ret)
@@ -1189,7 +1191,7 @@ static int mmc_test_align_read(struct mmc_test_card *test)
int ret, i;
struct scatterlist sg;
- for (i = 1;i < 4;i++) {
+ for (i = 1; i < TEST_ALIGN_END; i++) {
sg_init_one(&sg, test->buffer + i, 512);
ret = mmc_test_transfer(test, &sg, 1, 0, 1, 512, 0);
if (ret)
@@ -1216,7 +1218,7 @@ static int mmc_test_align_multi_write(struct mmc_test_card *test)
if (size < 1024)
return RESULT_UNSUP_HOST;
- for (i = 1;i < 4;i++) {
+ for (i = 1; i < TEST_ALIGN_END; i++) {
sg_init_one(&sg, test->buffer + i, size);
ret = mmc_test_transfer(test, &sg, 1, 0, size/512, 512, 1);
if (ret)
@@ -1243,7 +1245,7 @@ static int mmc_test_align_multi_read(struct mmc_test_card *test)
if (size < 1024)
return RESULT_UNSUP_HOST;
- for (i = 1;i < 4;i++) {
+ for (i = 1; i < TEST_ALIGN_END; i++) {
sg_init_one(&sg, test->buffer + i, size);
ret = mmc_test_transfer(test, &sg, 1, 0, size/512, 512, 0);
if (ret)
--
1.9.1
next prev parent reply other threads:[~2014-10-21 9:28 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-21 9:26 [PATCH 00/15] mmc: sdhci: Add 64-bit ADMA support Adrian Hunter
2014-10-21 9:26 ` [PATCH 01/15] mmc: sdhci: Fix incorrect ADMA2 descriptor table size Adrian Hunter
2014-10-21 9:26 ` [PATCH 02/15] mmc: sdhci: Fix ADMA page boundary warnings Adrian Hunter
2014-10-21 9:26 ` [PATCH 03/15] mmc: sdhci: Fix ADMA table size warning Adrian Hunter
2014-10-21 9:26 ` [PATCH 04/15] mmc: sdhci: Rename two ADMA-related functions for consistency Adrian Hunter
2014-10-21 9:26 ` [PATCH 05/15] mmc: sdhci: Rename adma_desc to adma_table Adrian Hunter
2014-10-21 9:26 ` [PATCH 06/15] mmc: sdhci: Add sdhci_adma_mark_end() Adrian Hunter
2014-10-21 9:26 ` [PATCH 07/15] mmc: sdhci: Use 'void *' for not 'u8 *' for ADMA data Adrian Hunter
2014-10-21 9:26 ` [PATCH 08/15] mmc: sdhci: Parameterize ADMA sizes and alignment Adrian Hunter
2014-10-21 9:26 ` [PATCH 09/15] mmc: sdhci: Define maximum segments Adrian Hunter
2014-10-21 9:26 ` [PATCH 10/15] mmc: sdhci: Define ADMA constants Adrian Hunter
2014-10-21 9:26 ` [PATCH 11/15] mmc: sdhci: Define ADMA descriptor structure Adrian Hunter
2014-10-21 9:26 ` [PATCH 12/15] mmc: sdhci: Add 64-bit ADMA support Adrian Hunter
2014-10-21 9:26 ` [PATCH 13/15] mmc: sdhci-acpi: Add 64-bit DMA support Adrian Hunter
2014-10-21 9:33 ` Arnd Bergmann
2014-10-21 10:45 ` Adrian Hunter
2014-10-21 11:05 ` Arnd Bergmann
2014-10-28 8:37 ` [PATCH V2] " Adrian Hunter
2014-10-28 9:43 ` Arnd Bergmann
2014-10-28 10:05 ` Adrian Hunter
2014-10-28 10:18 ` Arnd Bergmann
2014-10-28 11:41 ` Adrian Hunter
2014-10-28 13:54 ` Arnd Bergmann
2014-10-28 14:14 ` Adrian Hunter
2014-10-28 15:08 ` Arnd Bergmann
2014-10-28 15:14 ` Adrian Hunter
2014-10-28 15:38 ` Arnd Bergmann
2014-10-29 8:53 ` Adrian Hunter
2014-10-21 9:26 ` [PATCH 14/15] mmc: sdhci-pci: " Adrian Hunter
2014-10-21 9:26 ` Adrian Hunter [this message]
2014-10-30 7:25 ` [PATCH 00/15] mmc: sdhci: Add 64-bit ADMA support Adrian Hunter
2014-10-30 8:05 ` Arnd Bergmann
2014-10-30 8:40 ` Adrian Hunter
2014-10-30 10:00 ` Arnd Bergmann
2014-10-30 10:50 ` Adrian Hunter
2014-10-30 12:15 ` Arnd Bergmann
2014-10-30 12:55 ` Adrian Hunter
2014-11-03 8:28 ` Adrian Hunter
2014-11-03 14:40 ` Ulf Hansson
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=1413883585-16299-16-git-send-email-adrian.hunter@intel.com \
--to=adrian.hunter@intel.com \
--cc=chris@printf.net \
--cc=linux-mmc@vger.kernel.org \
--cc=ulf.hansson@linaro.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox