All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Gonzalez <marc_gonzalez@sigmadesigns.com>
To: Boris Brezillon <boris.brezillon@free-electrons.com>,
	linux-mtd <linux-mtd@lists.infradead.org>
Cc: Richard Weinberger <richard@nod.at>,
	Sebastian Frias <sf84@laposte.net>,
	Jean-Baptiste Lescher <jblescher@gmail.com>,
	Thibaud Cornic <thibaud_cornic@sigmadesigns.com>,
	Mason <slash.tmp@free.fr>
Subject: Re: [PATCH v2] mtd: nand: tango: import driver for tango chips
Date: Thu, 8 Sep 2016 18:37:25 +0200	[thread overview]
Message-ID: <57D193C5.8040004@sigmadesigns.com> (raw)
In-Reply-To: <57D189E1.3020508@sigmadesigns.com>

On 08/09/2016 17:55, Marc Gonzalez wrote:

> +static int decode_error_report(struct tango_nfc *nfc)
> +{
> +	u32 status, res;
> +
> +	status = readl_relaxed(nfc->reg_base + NFC_XFER_STATUS);
> +	if (status & PAGE_IS_EMPTY)
> +		return 0;
> +
> +	res = readl_relaxed(nfc->mem_base + ERROR_REPORT);
> +
> +	if (DECODE_ERR_ON_PKT_0(res) || DECODE_ERR_ON_PKT_N(res))
> +		return -EBADMSG;
> +
> +	return max(ERR_COUNT_PKT_0(res), ERR_COUNT_PKT_N(res));
> +}

This is probably an incorrect implementation. Boris mentioned that
we shouldn't return -EBADMSG?

# time insmod mtd/mtd_nandbiterrs.ko dev=1
[   19.498729] 
[   19.501435] ==================================================
[   19.508199] mtd_nandbiterrs: MTD device: 1
[   19.512372] mtd_nandbiterrs: MTD device size 536870912, eraseblock=131072, page=2048, oob=64
[   19.520893] mtd_nandbiterrs: Device uses 2 subpages of 1024 bytes
[   19.527034] mtd_nandbiterrs: Using page=0, offset=0, eraseblock=0
[   19.533986] mtd_nandbiterrs: incremental biterrors test
[   19.539297] mtd_nandbiterrs: write_page
[   19.543413] mtd_nandbiterrs: rewrite page
[   19.547766] mtd_nandbiterrs: read_page
[   19.551746] mtd_nandbiterrs: error: read failed at 0x0
[   19.556924] mtd_nandbiterrs: After 0 biterrors per subpage, read reported error -74
[   19.565432] mtd_nandbiterrs: finished successfully.
[   19.570343] ==================================================

It says "finished successfully", should I believe that?

Regards.

  reply	other threads:[~2016-09-08 16:37 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-02 10:02 [PATCH v1] mtd: nand: tango: import driver for tango controller Marc Gonzalez
2016-09-05  7:14 ` Boris Brezillon
2016-09-05 10:18   ` Mason
2016-09-05 11:15     ` Boris Brezillon
2016-09-08 15:55       ` [PATCH v2] mtd: nand: tango: import driver for tango chips Marc Gonzalez
2016-09-08 16:37         ` Marc Gonzalez [this message]
2016-09-09 16:13           ` [PATCH v3] " Marc Gonzalez
2016-09-11 12:50             ` Mason
2016-09-12 19:08               ` Boris Brezillon
2016-09-19 13:12                 ` [PATCH v5] " Marc Gonzalez
2016-09-19 15:57                   ` Marc Gonzalez
2016-09-19 17:06                   ` Boris Brezillon
2016-09-19 22:37                     ` Mason
2016-09-20  7:24                       ` Boris Brezillon
2016-09-20  7:39                         ` Artem Bityutskiy
2016-09-20  7:57                           ` Richard Weinberger
2016-09-21 16:45                   ` Marc Gonzalez

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=57D193C5.8040004@sigmadesigns.com \
    --to=marc_gonzalez@sigmadesigns.com \
    --cc=boris.brezillon@free-electrons.com \
    --cc=jblescher@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard@nod.at \
    --cc=sf84@laposte.net \
    --cc=slash.tmp@free.fr \
    --cc=thibaud_cornic@sigmadesigns.com \
    /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.