From patchwork Tue Aug 9 20:57:28 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Gardiner X-Patchwork-Id: 109283 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 2A767B70C7 for ; Wed, 10 Aug 2011 06:58:26 +1000 (EST) Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QqtNF-0000ZE-VZ; Tue, 09 Aug 2011 20:58:06 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QqtNE-0000Yi-O2; Tue, 09 Aug 2011 20:58:04 +0000 Received: from na3sys009aog116.obsmtp.com ([74.125.149.240]) by canuck.infradead.org with smtps (Exim 4.76 #1 (Red Hat Linux)) id 1QqtMq-0000T3-SU for linux-mtd@lists.infradead.org; Tue, 09 Aug 2011 20:57:42 +0000 Received: from mail-vx0-f181.google.com ([209.85.220.181]) (using TLSv1) by na3sys009aob116.postini.com ([74.125.148.12]) with SMTP ID DSNKTkGfQa+PLgTR93gFa++E+zqPYSA20Fms@postini.com; Tue, 09 Aug 2011 13:57:40 PDT Received: by mail-vx0-f181.google.com with SMTP id 39so411754vxi.12 for ; Tue, 09 Aug 2011 13:57:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nanometrics.ca; s=google; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :in-reply-to:references; bh=8Uv9ePylqIBfQ3A5ZdjRzcEJXvwzV/wMZMhd4YTL3yw=; b=MjJg/KyQIcECAo3+BcsfSkExCCIoQp7vP0pgcke62Jrf/a5dObL4/F5OZca79ugzV3 CH7QfbTZczJToIfAYw0A6DHYg0+3t1F1sByRY9unaDjnggp3l4IGpWQaN4YBlaWPIuBX e2PRyU7EVqgryGeNoMNGrGNYXFht41BM+bw/w= Received: by 10.52.19.133 with SMTP id f5mr6767949vde.210.1312923456096; Tue, 09 Aug 2011 13:57:36 -0700 (PDT) Received: from localhost.localdomain ([206.191.47.130]) by mx.google.com with ESMTPS id ca9sm278817vdc.3.2011.08.09.13.57.34 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 09 Aug 2011 13:57:35 -0700 (PDT) From: Ben Gardiner To: linux-mtd@lists.infradead.org Subject: [PATCH 2/3] nandtest: print number of bits corrected during test Date: Tue, 9 Aug 2011 16:57:28 -0400 Message-Id: X-Mailer: git-send-email 1.7.3.5 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110809_165741_215767_AC44975E X-CRM114-Status: GOOD ( 11.51 ) X-Spam-Score: -2.4 (--) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-2.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [74.125.149.240 listed in list.dnswl.org] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Ben Gardiner X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org 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 --- 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) {