All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Gardiner <bengardiner@nanometrics.ca>
To: linux-mtd@lists.infradead.org
Cc: Ben Gardiner <bengardiner@nanometrics.ca>
Subject: [PATCH 2/3] nandtest: print number of bits corrected during test
Date: Tue,  9 Aug 2011 16:57:28 -0400	[thread overview]
Message-ID: <f46b9092828dde57ea4bb4ce661c4f15ff2e0888.1312922073.git.bengardiner@nanometrics.ca> (raw)
In-Reply-To: <e51a260aa56112648b5413c66d4036e489ae09f7.1312922073.git.bengardiner@nanometrics.ca>
In-Reply-To: <cover.1312922073.git.bengardiner@nanometrics.ca>

The nandtest program monitors the corrected ecc stat to determine if an
ECC correction has taken place during the last write-read. If so, it
prints "ECC corrected".

The mtd subsytem will store the number of bits corrected in the corrected
ecc stat so update the nandtest output to print also the number of bits
corrected when performing the test.

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
---
 nandtest.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/nandtest.c b/nandtest.c
index d03dc11..dc28d09 100644
--- a/nandtest.c
+++ b/nandtest.c
@@ -98,7 +98,9 @@ int erase_and_write(loff_t ofs, unsigned char *data, unsigned char *rbuf)
 	}
 
 	if (newstats.corrected > oldstats.corrected) {
-		printf("\nECC corrected at %08x\n", (unsigned) ofs);
+		printf("\n %d bit(s) ECC corrected at %08x\n",
+				newstats.corrected - oldstats.corrected,
+				(unsigned) ofs);
 		oldstats.corrected = newstats.corrected;
 	}
 	if (newstats.failed > oldstats.failed) {
-- 
1.7.3.5

  parent reply	other threads:[~2011-08-09 20:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-09 20:38 [PATCH 0/3] mtd-utils: bit errors in nandtest Ben Gardiner
2011-08-09 20:57 ` [PATCH 1/3] mtd_debug: report ecc layout Ben Gardiner
2011-08-10 17:07   ` Brian Norris
2011-08-10 17:52     ` Ben Gardiner
2011-08-17  8:32     ` Artem Bityutskiy
2011-08-17  8:03   ` Artem Bityutskiy
2011-08-18 14:01     ` Ben Gardiner
2011-08-22 11:00       ` Artem Bityutskiy
2011-08-22 13:11         ` Ben Gardiner
2011-08-09 20:57 ` Ben Gardiner [this message]
2011-08-25 11:00   ` [PATCH 2/3] nandtest: print number of bits corrected during test Artem Bityutskiy
2011-08-09 20:57 ` [PATCH 3/3] nandtest: report estimated BER Ben Gardiner

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=f46b9092828dde57ea4bb4ce661c4f15ff2e0888.1312922073.git.bengardiner@nanometrics.ca \
    --to=bengardiner@nanometrics.ca \
    --cc=linux-mtd@lists.infradead.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 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.