* mmc_test : some results @ 2008-06-06 15:31 Nicolas Ferre 2008-06-09 0:21 ` Gururaja Hebbar K R 2008-06-09 11:08 ` Pierre Ossman 0 siblings, 2 replies; 5+ messages in thread From: Nicolas Ferre @ 2008-06-06 15:31 UTC (permalink / raw) To: Pierre Ossman, ARM Linux Mailing List, Linux Kernel list; +Cc: Marc Pignat Hi Pierre, Here are the results of a mmc_test run played on at91_mci after applying this patch series : http://lkml.org/lkml/2008/5/30/201 I skipped some of the tests just to concentrate on those ones. Can you tell me if the test is correct : are the errors reported for the xfer_size tests the normal behavior (I assume yes because a failure is simulated) ? ~ # echo 1 > /sys/class/mmc_host/mmc0/mmc0\:e624/test mmc0: Starting tests of card mmc0:e624... mmc0: Test case 1. Basic write (no data verification)... mmc0: Result: OK mmc0: Test case 2. Basic read (no data verification)... mmc0: Result: OK mmc0: Test case 3. Basic write (with data verification)... mmc0: Result: OK mmc0: Test case 4. Basic read (with data verification)... mmc0: Result: OK mmc0: Test case 5. Multi-block write... mmc0: Result: OK mmc0: Test case 6. Multi-block read... mmc0: Result: OK mmc0: Test case 7. Correct xfer_size at write (start failure)... mmc0: Result: ERROR (-84) mmc0: Test case 8. Correct xfer_size at read (start failure)... mmc0: Result: ERROR (-110) mmc0: Test case 9. Correct xfer_size at write (midway failure)... mmc0: Result: ERROR (-84) mmc0: Test case 10. Correct xfer_size at read (midway failure)... mmc0: Result: ERROR (-110) mmc0: Tests completed. ~ # Thanks, regards, -- Nicolas Ferre ^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: mmc_test : some results 2008-06-06 15:31 mmc_test : some results Nicolas Ferre @ 2008-06-09 0:21 ` Gururaja Hebbar K R 2008-06-09 7:54 ` Nicolas Ferre 2008-06-09 11:08 ` Pierre Ossman 1 sibling, 1 reply; 5+ messages in thread From: Gururaja Hebbar K R @ 2008-06-09 0:21 UTC (permalink / raw) To: Nicolas Ferre, Pierre Ossman, ARM Linux Mailing List, Linux Kernel list Hi Nicolas, Could you please be kind enough to share the test program so that we can test mmc driver on other platforms. i have a customized arm9 versatile board with mmci controller and would like to test the same TIA, Regards Gururaja -----Original Message----- From: linux-arm-kernel-bounces@lists.arm.linux.org.uk [mailto:linux-arm-kernel-bounces@lists.arm.linux.org.uk] On Behalf Of Nicolas Ferre Sent: Friday, June 06, 2008 8:31 AM To: Pierre Ossman; ARM Linux Mailing List; Linux Kernel list Subject: mmc_test : some results Hi Pierre, Here are the results of a mmc_test run played on at91_mci after applying this patch series : http://lkml.org/lkml/2008/5/30/201 I skipped some of the tests just to concentrate on those ones. Can you tell me if the test is correct : are the errors reported for the xfer_size tests the normal behavior (I assume yes because a failure is simulated) ? ~ # echo 1 > /sys/class/mmc_host/mmc0/mmc0\:e624/test mmc0: Starting tests of card mmc0:e624... mmc0: Test case 1. Basic write (no data verification)... mmc0: Result: OK mmc0: Test case 2. Basic read (no data verification)... mmc0: Result: OK mmc0: Test case 3. Basic write (with data verification)... mmc0: Result: OK mmc0: Test case 4. Basic read (with data verification)... mmc0: Result: OK mmc0: Test case 5. Multi-block write... mmc0: Result: OK mmc0: Test case 6. Multi-block read... mmc0: Result: OK mmc0: Test case 7. Correct xfer_size at write (start failure)... mmc0: Result: ERROR (-84) mmc0: Test case 8. Correct xfer_size at read (start failure)... mmc0: Result: ERROR (-110) mmc0: Test case 9. Correct xfer_size at write (midway failure)... mmc0: Result: ERROR (-84) mmc0: Test case 10. Correct xfer_size at read (midway failure)... mmc0: Result: ERROR (-110) mmc0: Tests completed. ~ # Thanks, regards, -- Nicolas Ferre ------------------------------------------------------------------- List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: mmc_test : some results 2008-06-09 0:21 ` Gururaja Hebbar K R @ 2008-06-09 7:54 ` Nicolas Ferre 0 siblings, 0 replies; 5+ messages in thread From: Nicolas Ferre @ 2008-06-09 7:54 UTC (permalink / raw) To: Gururaja Hebbar K R Cc: Pierre Ossman, ARM Linux Mailing List, Linux Kernel list Gururaja Hebbar K R : > Hi Nicolas, > > Could you please be kind enough to share the test program so that we can > test mmc driver on other platforms. mmc_test is included in the mainline kernel : http://lkml.org/lkml/2008/5/17/45 I just selected the tests I wanted to use in the source code (in mmc_test_cases tab). Cheers, -- Nicolas Ferre ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: mmc_test : some results 2008-06-06 15:31 mmc_test : some results Nicolas Ferre 2008-06-09 0:21 ` Gururaja Hebbar K R @ 2008-06-09 11:08 ` Pierre Ossman 2008-06-10 9:27 ` [PATCH] at91_mci: manage cmd error and data error independently Nicolas Ferre 1 sibling, 1 reply; 5+ messages in thread From: Pierre Ossman @ 2008-06-09 11:08 UTC (permalink / raw) To: Nicolas Ferre; +Cc: ARM Linux Mailing List, Linux Kernel list, Marc Pignat [-- Attachment #1: Type: text/plain, Size: 884 bytes --] On Fri, 06 Jun 2008 17:31:15 +0200 Nicolas Ferre <nicolas.ferre@atmel.com> wrote: > Hi Pierre, > > Here are the results of a mmc_test run played on at91_mci after applying > this patch series : > http://lkml.org/lkml/2008/5/30/201 > > I skipped some of the tests just to concentrate on those ones. > > Can you tell me if the test is correct : are the errors reported for the > xfer_size tests the normal behavior (I assume yes because a failure is > simulated) ? No. You're supposed to get an OK there as well. Basically it tests that the driver doesn't report some unexpected error (-ETIMEDOUT is the desired one) or overreports the number of written bytes. > > ~ # echo 1 > /sys/class/mmc_host/mmc0/mmc0\:e624/test FYI, I've added some changes that will make that invocation only run test 1. Do echo "" for all tests in the future. Rgds Pierre [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] at91_mci: manage cmd error and data error independently 2008-06-09 11:08 ` Pierre Ossman @ 2008-06-10 9:27 ` Nicolas Ferre 0 siblings, 0 replies; 5+ messages in thread From: Nicolas Ferre @ 2008-06-10 9:27 UTC (permalink / raw) To: Pierre Ossman; +Cc: ARM Linux Mailing List, Linux Kernel list, Marc Pignat In at91_mci_completed_command() function, this patch distinguishes command error and data error. It reports it in the corresponding error field. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> --- Related to this thread : Pierre Ossman : > On Fri, 06 Jun 2008 17:31:15 +0200 > Nicolas Ferre <nicolas.ferre@atmel.com> wrote: > > >> Hi Pierre, >> >> Here are the results of a mmc_test run played on at91_mci after applying >> this patch series : >> http://lkml.org/lkml/2008/5/30/201 >> >> I skipped some of the tests just to concentrate on those ones. >> >> Can you tell me if the test is correct : are the errors reported for the >> xfer_size tests the normal behavior (I assume yes because a failure is >> simulated) ? >> > > No. You're supposed to get an OK there as well. Basically it tests that > the driver doesn't report some unexpected error (-ETIMEDOUT is the > desired one) or overreports the number of written bytes. > Ok, so here is the first correction of the driver reporting the proper values in read. It goes on top of this series : http://lkml.org/lkml/2008/5/30/201 drivers/mmc/host/at91_mci.c | 28 ++++++++++++++++++++-------- 1 files changed, 20 insertions(+), 8 deletions(-) diff --git a/drivers/mmc/host/at91_mci.c b/drivers/mmc/host/at91_mci.c index 9948fe1..86a3c5b 100644 --- a/drivers/mmc/host/at91_mci.c +++ b/drivers/mmc/host/at91_mci.c @@ -663,6 +664,7 @@ static void at91_mci_process_next(struct at91mci_host *host) static void at91_mci_completed_command(struct at91mci_host *host, unsigned int status) { struct mmc_command *cmd = host->cmd; + struct mmc_data *data = cmd->data; at91_mci_write(host, AT91_MCI_IDR, 0xffffffff & ~(AT91_MCI_SDIOIRQA | AT91_MCI_SDIOIRQB)); @@ -685,15 +687,25 @@ static void at91_mci_completed_command(struct at91mci_host *host, unsigned int s cmd->error = 0; } else { - if (status & (AT91_MCI_RTOE | AT91_MCI_DTOE)) - cmd->error = -ETIMEDOUT; - else if (status & (AT91_MCI_RCRCE | AT91_MCI_DCRCE)) - cmd->error = -EILSEQ; - else - cmd->error = -EIO; + if (status & (AT91_MCI_DTOE | AT91_MCI_DCRCE)) { + if (data) { + if (status & AT91_MCI_DTOE) + data->error = -ETIMEDOUT; + else if (status & AT91_MCI_DCRCE) + data->error = -EILSEQ; + } + } else { + if (status & AT91_MCI_RTOE) + cmd->error = -ETIMEDOUT; + else if (status & AT91_MCI_RCRCE) + cmd->error = -EILSEQ; + else + cmd->error = -EIO; + } - pr_debug("Error detected and set to %d (cmd = %d, retries = %d)\n", - cmd->error, cmd->opcode, cmd->retries); + pr_debug("Error detected and set to %d/%d (cmd = %d, retries = %d)\n", + cmd->error, data ? data->error : 0, + cmd->opcode, cmd->retries); } } else -- 1.5.3.7 ^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-06-10 9:27 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-06-06 15:31 mmc_test : some results Nicolas Ferre 2008-06-09 0:21 ` Gururaja Hebbar K R 2008-06-09 7:54 ` Nicolas Ferre 2008-06-09 11:08 ` Pierre Ossman 2008-06-10 9:27 ` [PATCH] at91_mci: manage cmd error and data error independently Nicolas Ferre
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox