History log of /drivers/mmc/card/mmc_test.c
Revision Date Author Comments
4be7085f744be070d327ed258d6ceb79b7323f6d 19-Jul-2013 Jingoo Han <jg1.han@samsung.com> mmc: mmc_test: replace strict_strtol() with kstrtol_from_user()

The usage of strict_strtol() is not preferred, because
strict_strtol() is obsolete. Thus, kstrtol() should be used.

Also, both kstrtol() and copy_from_user() can be replaced
with kstrtol_from_user() to make the code simpler.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
7628774851751e55362ec7d9d57c9334e656a655 10-Jun-2013 Ulf Hansson <ulf.hansson@linaro.org> mmc: core: Handle card shutdown from mmc_bus

Considering shutdown of the card, the responsibility to initate this
sequence shall be driven from the mmc_bus.

This patch enables the mmc_bus to handle this sequence properly. A new
.shutdown callback is added in the mmc_driver struct which is used to
shutdown the blk device.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
739c69c964fb4c040df451ef2e4cd6ea4f8b8e2d 14-Nov-2011 Per Forlin <per.forlin@stericsson.com> 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>
f4ae40a6a50a98ac23d4b285f739455e926a473e 24-Jul-2011 Al Viro <viro@zeniv.linux.org.uk> switch debugfs to umode_t

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
a3c76eb9d4a1e68a69dd880cf0bcb8a52418b993 11-Oct-2011 Girish K S <girish.shivananjappa@linaro.org> mmc: replace printk with appropriate display macro

All the files using printk function for displaying kernel messages
in the mmc driver have been replaced with corresponding macro.

Signed-off-by: Girish K S <girish.shivananjappa@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
88b47679746b81534002bcba42da97ab82b5d12a 03-Jul-2011 Paul Gortmaker <paul.gortmaker@windriver.com> mmc: Add module.h to drivers/mmc users assuming implicit presence.

We are cleaning up the implicit presence of module.h; these guys are
some of the people who just assume it will be there. Call it out
explitly for those that really need it.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2311344c33cb8add492881900ca427b62f5a7eae 29-Aug-2011 Adrian Hunter <adrian.hunter@intel.com> mmc: mmc-test: add eMMC hardware reset test

MMC core provides a checking function that checks if the reset
has happended. Add a test to use that function.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
7435bb7950ba8a3cbfa6d0c01e92588562533a3f 10-Aug-2011 Jaehoon Chung <jh80.chung@samsung.com> mmc: core: use defined R1_STATE_PRG macro for card status

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
d5a5bd1c3f7e8d010393530d60df8da75218a488 22-Jul-2011 Andy Shevchenko <andriy.shevchenko@linux.intel.com> mmc: mmc_test: avoid stalled file in debugfs

During card removal and inserting cycle the test file in the debugfs could be
stalled until the host driver removes it. Let's keep the file in the linked
list and destroy it when card is removed.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Per Forlin <per.forlin@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
bf043330362b1ccb0c0611b8fc394e06ba8498b0 01-Jul-2011 Per Forlin <per.forlin@linaro.org> mmc: mmc_test: test to measure how sg_len affect performance

Add a test that measures how the mmc bandwidth depends on the numbers of
sg elements in the sg list. The transfer size if fixed and sg length goes
from a few up to 512. The purpose is to measure overhead caused by
multiple sg elements.

Signed-off-by: Per Forlin <per.forlin@linaro.org>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Venkatraman S <svenkatr@ti.com>
Tested-by: Sourav Poddar <sourav.poddar@ti.com>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
9f9c4180f88d127e2bb83913d80750a8fbdb8f3e 01-Jul-2011 Per Forlin <per.forlin@linaro.org> mmc: mmc_test: add test for non-blocking transfers

Add four tests for read and write performance per
different transfer size, 4k to 4M.
* Read using blocking mmc request
* Read using non-blocking mmc request
* Write using blocking mmc request
* Write using non-blocking mmc request

The host driver must support pre_req() and post_req()
in order to run the non-blocking test cases.

Signed-off-by: Per Forlin <per.forlin@linaro.org>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Venkatraman S <svenkatr@ti.com>
Tested-by: Sourav Poddar<sourav.poddar@ti.com>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
54f3caf5bcb732c9ac48308b7b43eb9aaa7ed8ca 01-Jul-2011 Per Forlin <per.forlin@linaro.org> mmc: mmc_test: add debugfs file to list all tests

Add a debugfs file "testlist" to print all available tests.

Signed-off-by: Per Forlin <per.forlin@linaro.org>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Venkatraman S <svenkatr@ti.com>
Tested-by: Sourav Poddar<sourav.poddar@ti.com>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
253d6a280f77a9b61a76f9b1bfb83545fbd58726 10-May-2011 Andy Shevchenko <ext-andriy.shevchenko@nokia.com> mmc: mmc_test: minor clean up, use t = &test.area everywhere

Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
24f5b53ba076e983bc64fa48534ca795d7813d51 14-Apr-2011 Chris Ball <cjb@laptop.org> mmc: initialize struct mmc_request at declaration time

Converts from:
struct mmc_request mrq;
memset(&mrq, 0, sizeof(struct mmc_request));

to:
struct mmc_request mrq = {0};

because it's shorter, as performant, and easier to work out whether
initialization has happened.

Signed-off-by: Chris Ball <cjb@laptop.org>
a61ad2b49bfce94dfddce828cd9222e4b9e7825b 14-Apr-2011 Chris Ball <cjb@laptop.org> mmc: initialize struct mmc_data at declaration time

Converts from:
struct mmc_data data;
memset(&data, 0, sizeof(struct mmc_data));

to:
struct mmc_data data = {0};

because it's shorter, as performant, and easier to work out whether
initialization has happened.

Signed-off-by: Chris Ball <cjb@laptop.org>
1278dba167f01bb3c6626d16450d31129d041087 14-Apr-2011 Chris Ball <cjb@laptop.org> mmc: initialize struct mmc_command at declaration time

Converts from:
struct mmc_command cmd;
memset(&cmd, 0, sizeof(struct mmc_command));

to:
struct mmc_command cmd = {0};

because it's shorter, as performant, and easier to work out whether
initialization has happened.

Signed-off-by: Chris Ball <cjb@laptop.org>
25985edcedea6396277003854657b5f3cb31a628 31-Mar-2011 Lucas De Marchi <lucas.demarchi@profusion.mobi> Fix common misspellings

Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
5a8fba524c2063cb297bdbacda535448ee365dc4 16-Mar-2011 Chris Ball <cjb@laptop.org> mmc: mmc_test: Remove set-but-unused variable.

Fixes:

drivers/mmc/card/mmc_test.c: In function ‘mmc_test_seq_perf’:
drivers/mmc/card/mmc_test.c:1878:28: warning: variable ‘ts’ set but not
used [-Wunused-but-set-variable]

There's no reason to be calling timespec_sub() here, because
mmc_test_print_avg_rate() is going to do that itself.

Signed-off-by: Chris Ball <cjb@laptop.org>
Cc: Adrian Hunter <adrian.hunter@nokia.com>
a803d551d92079beb599cc37fa407c059c82c821 08-Feb-2011 Adrian Hunter <adrian.hunter@nokia.com> mmc: mmc_test: add tests to measure large sequential I/O performance

Add two large sequential I/O performance tests:
35. Large sequential read into scattered pages
36. Large sequential write from scattered pages

The tests measure transfer times for 10MiB, 100MiB, 1000MiB.

Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
b6056d12342f936256cbf64c86459af06f11cd5e 08-Feb-2011 Adrian Hunter <adrian.hunter@nokia.com> mmc: mmc_test: add tests to measure random I/O operations per second

Existing performance tests measure single or sequential I/O speed.
Add two random I/O tests:
33. Random read performance by transfer size
34. Random write performance by transfer size

Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
0532ff6358ae00615cfba7212f5075356b437c66 08-Feb-2011 Adrian Hunter <adrian.hunter@nokia.com> mmc: mmc_test: make performance test area size about 4MiB

The test area size was set to the preferred erase size but for comparison
purposes it is better if it is the same size for different devices. Make
it a multiple of preferred erase size that is greater than or equal to 4MiB.

Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
54d6b44a5f0da708e8a9e496df304e05e8748ef9 06-Feb-2011 Pawel Moll <pawel.moll@arm.com> mmc: mmc_test: Only warn about not waiting for busy if it's supported

If the MMC host controller does not support waiting for card signaling
busy state (MMC_CAP_WAIT_WHILE_BUSY cap), there is no point in prining
the relevant warning message.

Signed-off-by: Pawel Moll <pawel.moll@arm.com>
Reviewed-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
0f8d8ea64ec7c77ca5beb59534d386fe0235961a 24-Aug-2010 Adrian Hunter <adrian.hunter@nokia.com> mmc: Fixes for Dual Data Rate (DDR) support

The DDR support patch needs the following fixes:

- The block driver does not need to know about DDR, any more
than it needs to know about bus width.
- Not only the card must be switched to DDR mode. The host
controller must also be configured, which is done through
the 'set_ios()' function.
- Do not set the DDR mode state until after the switch command
is successful.
- Setting block length is not supported in DDR mode. Make that
a core function and change the other place it is used (mmc_test)
also.

Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
c27d37aed0ba9159c34747b2e1e2c3eddac454f8 23-Sep-2010 Adrian Hunter <adrian.hunter@nokia.com> mmc_test: fix display of .5 KiB

Append .5 to KiB display when there are an odd number of sectors.

Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
3d203be833068c0f633878743d0c08d6acd24b58 23-Sep-2010 Adrian Hunter <adrian.hunter@nokia.com> mmc_test: fix memory allocation segment limits

Correctly allocate memory to meet the host controller
driver's maximum segment size and count limits.

Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
130067ed15f6e8a1209898646878f5bc0a17d3dd 10-Sep-2010 Andy Shevchenko <andy.shevchenko@gmail.com> mmc_test: move files from sysfs to debugfs

As proposed by Greg K-H it is more logical to keep files for the mmc_test
driver under debugfs.

Additionally this patch brings seq_file API for show() method. It allows
to write unlimited data to the file.

Example of usage:
# mount -t debugfs none /sys/kernel/debug
# modprobe mmc_test
[ 581.395843] mmc_test mmc0:0001: Card claimed for testing.
# echo 25 > /sys/kernel/debug/mmc0/mmc0\:0001/test
[ 604.568542] mmc0: Starting tests of card mmc0:0001...
[ 604.582733] mmc0: Test case 25. Best-case read performance into scattered pages...
[ 604.923553] mmc0: Transfer of 8192 sectors (4096 KiB) took 0.124664314 seconds (33644 kB/s, 32856 KiB/s)
[ 604.933227] mmc0: Result: OK
[ 604.936248] mmc0: Tests completed.
# cat /sys/kernel/debug/mmc0/mmc0\:0001/test
Test 25: 0
1 8192 0.124664314 33644784

Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Cc: Greg KH <greg@kroah.com>
Cc: Adrian Hunter <adrian.hunter@nokia.com>
Cc: Chris Ball <cjb@laptop.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
3183aa1534de4e98ffb0527d4f2be7ac9f019a4e 01-Sep-2010 Andy Shevchenko <andy.shevchenko@gmail.com> mmc_test: collect data and show it via sysfs by demand

Make it possible to get test results via sysfs. It helps to do tests
non-interactively. We have the file created under sysfs already and
can use it to show test results.

Prior to this patch, the "test" file under each card's sysfs node was
write-only, and results were obtained by looking at dmesg. This patch
improves programmatic access to the test results, making them available by
reading back from the same "test" file:

[root@host mmc0:e624]# echo 6 > test
[root@host mmc0:e624]# cat test
Test 6: 2

[cjb@laptop.org: changelog improvements]
Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Cc: Chris Ball <cjb@laptop.org>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
5c25aee5364550d7fa6314886370e76cda18d7e2 01-Sep-2010 Andy Shevchenko <andy.shevchenko@gmail.com> mmc_test: change simple_strtol() to strict_strtol()

It's better to use strict_strtol() to convert user's input and strictly
check it. At least it forbids to interpret wrong input as a 0 and
prevents to run all tests.

Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
63be54cefa3ae58e1e82036945e3c27f941f5a0d 01-Sep-2010 Andy Shevchenko <andy.shevchenko@gmail.com> mmc_test: use API to check card type

There are methods to check card type. Let's use them instead of direct checking
type bits.

Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
c8c8c1bdbe585d9159c4585216451faa4c35e4ec 10-Sep-2010 Adrian Hunter <adrian.hunter@nokia.com> mmc_test: fix performance tests that go over max_blk_count

The host controller driver limits I/O transfers to maximum
transfer size, maximum block count, maximum segment size
and maximum segment count. The performance tests were
not obeying these limits which meant they would not work
with some drivers. This patch fixes that.

Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
265cdc900ce93c0cd2465d751fe75ff2e55e126e 18-Sep-2010 Andy Shevchenko <andy.shevchenko@gmail.com> mmc: rename dev_to_mmc_card() to mmc_dev_to_card()

Global symbols should use their subsystem name in a prefixed fashion.

Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
453722b9f7366e5b8b46101358dd7bcaef62b59d 20-Aug-2010 Andy Shevchenko <andy.shevchenko@gmail.com> mmc: make mmc_dev_to_card() macro public

Conversion from struct device to struct mmc_card is used more than in one
place. Due to this it's better to have public macro for such thing.

Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Cc: Adrian Hunter <adrian.hunter@nokia.com>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
fec4dcce237c7185ff7129e704bc508850b6e3f0 11-Aug-2010 Adrian Hunter <adrian.hunter@nokia.com> mmc_test: fix large memory allocation

- Fix mmc_test_alloc_mem.

- Use nr_free_buffer_pages() instead of sysinfo.totalram to determine
total lowmem pages.

- Change variables containing memory sizes to unsigned long.

- Limit maximum test area size to 128MiB because that is the maximum MMC
high capacity erase size (the maxmium SD allocation unit size is just
4MiB)

Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
64f7120d890b892ed2c82c87bed958902e809075 11-Aug-2010 Adrian Hunter <adrian.hunter@nokia.com> mmc_test: add performance tests

mmc_test provides tests aimed at testing SD/MMC hosts. This patch adds
performance tests.

It is advantageous to have performance tests in a kernel
module like mmc_test for the following reasons:
- transfer times can be measured very accurately
- arbitrarily large transfers are possible
- the effect of contiguous vs scattered pages
can be determined

The new tests are:

23. Best-case read performance
24. Best-case write performance
25. Best-case read performance into scattered pages
26. Best-case write performance from scattered pages
27. Single read performance by transfer size
28. Single write performance by transfer size
29. Single trim performance by transfer size
30. Consecutive read performance by transfer size
31. Consecutive write performance by transfer size
32. Consecutive trim performance by transfer size

Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
5a0e3ad6af8660be21ca98a971cd00f331318c05 24-Mar-2010 Tejun Heo <tj@kernel.org> include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h

percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.

2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).

* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
c286d03cce118e9fb8dda8da43f9131c169c5a75 10-Feb-2010 Johan Kristell <johan.kristell@axis.com> mmc_test: block addressed cards

This patch fixes a bug in the multiblock write tests where the written
data is read back for verifying one block at a time. The tests in
mmc_test assumes that all cards are byte addressable.

This will cause the multi block write tests to fail, leading the user of
the mmc_test driver thinking there is something wrong with the sdhci
driver they are testing.

The start address for the block is calculated as: blocknum * 512. For
block addressable cards the blocknum alone should be used.

Signed-off-by: Johan Kristell <johan.kristell@axis.com>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
58a5dd3e0e77029d3db1f8fa75d0b54b38169d5d 13-Feb-2009 Rabin Vincent <rabin@rab.in> mmc_test: fix basic read test

Due to a typo in the Basic Read test, it's currently identical to the
Basic Write test. Fix this.

Signed-off-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
a650031a6bd16cb6789da9b3c27fc97341239f12 13-Sep-2008 Akinobu Mita <akinobu.mita@gmail.com> mmc_test: initialize mmc_test_lock statically

The mutex mmc_test_lock is initialized at every time mmc_test device
is probed. Probing another mmc_test device may break the mutex, if
the probe function is called while the mutex is locked.

This patch fixes it by statically initializing mmc_test_lock.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
b7ac2cf1cdf346b34cbc2104d386a9d29d12aa4c 29-Jul-2008 Pierre Ossman <drzeus@drzeus.cx> mmc_test: Revert "mmc_test: test oversized sg lists"

This reverts commit 48b5352ea1891455eb8e824cf7d92f66931a090f. Oversized
sg lists are not allowed anymore, and the core even checks for them in
debug mode, so this test is entirely incorrect.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
60c9c7b1d91396f511e55a2a5be13d148dcf66ff 22-Jul-2008 Pierre Ossman <drzeus@drzeus.cx> mmc_test: print message when attaching to card

Make it a bit more obvious that the card has been claimed by the
mmc_test driver so that people don't have to wonder why their block
device never shows up.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
48b5352ea1891455eb8e824cf7d92f66931a090f 21-Jul-2008 Pierre Ossman <drzeus@drzeus.cx> mmc_test: test oversized sg lists

Add tests that make sure the driver properly checks the blocks and
blksz fields and doesn't assume the sg list has a size that perfectly
matches the current request.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2661081f5ab9cb25359d27f88707a018cf4e68e9 04-Jul-2008 Pierre Ossman <drzeus@drzeus.cx> mmc_test: highmem tests

Add a couple of tests to make sure the host driver handles highmem
memory pages properly. Unfortunately there is no way to guarantee an
allocation below 4 GB in i386, so it might give you addresses that
are out of reach for the hardware (OTOH, so will any other highmem
allocation in the kernel).

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
6b174931a73177c6519f87e6a8d5ae6ba269cdb5 30-Jun-2008 Pierre Ossman <drzeus@drzeus.cx> mmc_test: cleanup

Clean up and reorganise the mmc_test driver so that it (hopefully)
is easier to extend with more complex tests.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
0121a9829bf28c65e1a05cc881899c10d82b8de2 28-Jun-2008 Pierre Ossman <drzeus@drzeus.cx> mmc_test: only bind to supported cards

We can only perform the tests on MMC and SD cards, so avoid binding
to any other type.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
fd8c326cadd2f781d5c4d6bcee79bb17b3745bb0 24-May-2008 Pierre Ossman <drzeus@drzeus.cx> mmc_test: add test case control

Add the ability to run just a single test case by writing the test
case number into the sysfs "test" file.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
88ae600d58a8d3160144af480133a988404b8d59 12-Aug-2007 Pierre Ossman <drzeus@drzeus.cx> mmc: mmc host test driver

A dummy driver that performs a series of requests that are often mis-
handled by host drivers.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>