block: Add eMMC4.5 packed commands unit-tests
Subsystems (2)
cover block: Add eMMC4.5 packed commands unit-tests
Expose the following packed commands tests:
- Test the write packed commands list preparation
- Simulate a returned error code
- Send an invalid packed command to the card
This patch is dependant in the following patches:
[PATCH v7 1/3] mmc: core: Add packed command feature of eMMC4.5 [PATCH v7 2/3] mmc: core: Support packed write command for eMMC4.5 device [RFC/PATCH 1/1] Add MMC write packing statistics
[PATCH v4 1/1] block: Add test-iosched scheduler
Maya Erez (1):
block: Add eMMC4.5 packed commands unit-tests
drivers/mmc/card/Kconfig | 11 + drivers/mmc/card/Makefile | 1 + drivers/mmc/card/block.c | 82 ++- drivers/mmc/card/mmc_block_test.c | 1410 +++++++++++++++++++++++++++++++++++++ drivers/mmc/card/queue.h | 15 + 5 files changed, 1507 insertions(+), 12 deletions(-) create mode 100644 drivers/mmc/card/mmc_block_test.c
Signature · 4 lines
1.7.3.3 -- Sent by a consultant of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
PATCH 1/1 block: Add eMMC4.5 packed commands unit-tests
Expose the following packed commands tests:
- Test the write packed commands list preparation
- Simulate a returned error code
- Send an invalid packed command to the card
drivers/mmc/card/Kconfig +11 -0
@@ -67,3 +67,14 @@ config MMC_TEST This driver is only of interest to those developing or testing a host driver. Most people should say N here. + +config MMC_BLOCK_TEST + tristate "MMC block test" + depends on MMC_BLOCK && IOSCHED_TEST + default m + help + MMC block test can be used with test iosched to test the MMC block + device. + Currently used to test eMMC 4.5 features (packed commands, sanitize, + BKOPs). +
drivers/mmc/card/Makefile +1 -0
@@ -8,3 +8,4 @@ obj-$(CONFIG_MMC_TEST) += mmc_test.o obj-$(CONFIG_SDIO_UART) += sdio_uart.o +obj-$(CONFIG_MMC_BLOCK_TEST) += mmc_block_test.o
drivers/mmc/card/block.c +70 -12
100 lines not on this page · raw message
drivers/mmc/card/mmc_block_test.c new file +1410 -0
1,410 lines not on this page · raw message
drivers/mmc/card/queue.h +15 -0
@@ -12,6 +12,17 @@ struct mmc_blk_request {struct mmc_data data; }; +enum mmc_blk_status { +MMC_BLK_SUCCESS =0 , +MMC_BLK_PARTIAL , +MMC_BLK_CMD_ERR , +MMC_BLK_RETRY , +MMC_BLK_ABORT , +MMC_BLK_DATA_ERR , +MMC_BLK_ECC_ERR , +MMC_BLK_NOMEDIUM , +}; +enum mmc_packed_cmd {MMC_PACKED_NONE =0 ,MMC_PACKED_WRITE ,
@@ -45,6 +56,8 @@ struct mmc_queue {struct mmc_queue_req mqrq[2 ];struct mmc_queue_req *mqrq_cur;struct mmc_queue_req *mqrq_prev; +int (*err_check_fn) (struct mmc_card *,struct mmc_async_req *); +void (*packed_test_fn) (struct request_queue *,struct mmc_queue_req *); }; extern int mmc_init_queue(struct mmc_queue *, struct mmc_card *, spinlock_t *,
@@ -58,4 +71,6 @@ extern unsigned int mmc_queue_map_sg(struct mmc_queue *,extern void mmc_queue_bounce_pre (struct mmc_queue_req *);extern void mmc_queue_bounce_post (struct mmc_queue_req *); +extern void print_mmc_packing_stats (struct mmc_card *card); +#endif
Signature · 4 lines
1.7.3.3 -- Sent by a consultant of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
Quoted 13 lines · Maya Erez
Expose the following packed commands tests:
- Test the write packed commands list preparation
- Simulate a returned error code
- Send an invalid packed command to the cardSigned-off-by Lee Susman <[email protected]>Signed-off-by Maya Erez <[email protected]>drivers/mmc/card/Kconfig +0
-0
drivers/mmc/card/Kconfig config MMC_TEST · line 73
Quoted 7 lines
drivers/mmc/card/Kconfig +4
-0@@ -67,3 +67,14 @@ config MMC_TEST This driver is only of interest to those developing or testing a host driver. Most people should say N here. + +config MMC_BLOCK_TEST + tristate "MMC block test" + depends on MMC_BLOCK && IOSCHED_TEST
Umm, if this depends on your iosched-test patch, then you should make them both part of a patch series. It would have answered one of my questions on that patch.
Cheers,
Jeff
Quoted 27 lines · Jeff Moyer
Quoted 13 lines · Maya Erez
Expose the following packed commands tests:
- Test the write packed commands list preparation
- Simulate a returned error code
- Send an invalid packed command to the cardSigned-off-by Lee Susman <[email protected]>Signed-off-by Maya Erez <[email protected]>drivers/mmc/card/Kconfig +0
-0drivers/mmc/card/Kconfig config MMC_TEST · line 73
Quoted 7 lines
drivers/mmc/card/Kconfig +4
-0@@ -67,3 +67,14 @@ config MMC_TEST This driver is only of interest to those developing or testing a host driver. Most people should say N here. + +config MMC_BLOCK_TEST + tristate "MMC block test" + depends on MMC_BLOCK && IOSCHED_TESTUmm, if this depends on your iosched-test patch, then you should make them both part of a patch series. It would have answered one of my questions on that patch.
Quoted 3 lines
Cheers,
Jeff
I will combine them in the next patch.
Thanks,
Maya Erez
Signature · 2 lines
Sent by consultant of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum