From: Boris Brezillon <boris.brezillon@bootlin.com>
To: Chris Packham <Chris.Packham@alliedtelesis.co.nz>
Cc: Miquel Raynal <miquel.raynal@bootlin.com>,
Richard Weinberger <richard@nod.at>,
David Woodhouse <dwmw2@infradead.org>,
Brian Norris <computersforpeace@gmail.com>,
Marek Vasut <marek.vasut@gmail.com>,
"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: ubifs error with marvell_nand on Armada-98DX4251 (was Re: [PATCH] mtd: rawnand: marvell: fix command xtype in BCH write hook)
Date: Tue, 8 May 2018 09:59:37 +0200 [thread overview]
Message-ID: <20180508095937.46678a01@bbrezillon> (raw)
In-Reply-To: <91c282c4fe9344d88684131d1a64dcf2@svr-chch-ex1.atlnz.lc>
On Tue, 8 May 2018 01:38:13 +0000
Chris Packham <Chris.Packham@alliedtelesis.co.nz> wrote:
> Hi Boris,
>
> Thanks for picking this up while Miquel is taking a break.
Can you try with the following diff applied?
--->8---
diff --git a/drivers/mtd/nand/raw/marvell_nand.c b/drivers/mtd/nand/raw/marvell_nand.c
index db5ec4e8bde9..ebb1d141b900 100644
--- a/drivers/mtd/nand/raw/marvell_nand.c
+++ b/drivers/mtd/nand/raw/marvell_nand.c
@@ -1194,11 +1194,13 @@ static void marvell_nfc_hw_ecc_bch_read_chunk(struct nand_chip *chip, int chunk,
NDCB0_CMD2(NAND_CMD_READSTART);
/*
- * Trigger the naked read operation only on the last chunk.
- * Otherwise, use monolithic read.
+ * Trigger the monolithic read on the first chunk, then naked read on
+ * intermediate chunks and finally a last naked read on the last chunk.
*/
- if (lt->nchunks == 1 || (chunk < lt->nchunks - 1))
+ if (chunk == 0)
nfc_op.ndcb[0] |= NDCB0_CMD_XTYPE(XTYPE_MONOLITHIC_RW);
+ else if (chunk < lt->nchunks - 1)
+ nfc_op.ndcb[0] |= NDCB0_CMD_XTYPE(XTYPE_NAKED_RW);
else
nfc_op.ndcb[0] |= NDCB0_CMD_XTYPE(XTYPE_LAST_NAKED_RW);
next prev parent reply other threads:[~2018-05-08 7:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-03 10:00 [PATCH] mtd: rawnand: marvell: fix command xtype in BCH write hook Miquel Raynal
2018-05-04 0:06 ` Chris Packham
2018-05-04 7:10 ` Miquel Raynal
2018-05-07 3:48 ` ubifs error with marvell_nand on Armada-98DX4251 (was Re: [PATCH] mtd: rawnand: marvell: fix command xtype in BCH write hook) Chris Packham
2018-05-07 7:50 ` Boris Brezillon
2018-05-08 1:38 ` Chris Packham
2018-05-08 7:59 ` Boris Brezillon [this message]
2018-05-08 23:40 ` Chris Packham
2018-05-07 7:41 ` [PATCH] mtd: rawnand: marvell: fix command xtype in BCH write hook Boris Brezillon
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=20180508095937.46678a01@bbrezillon \
--to=boris.brezillon@bootlin.com \
--cc=Chris.Packham@alliedtelesis.co.nz \
--cc=computersforpeace@gmail.com \
--cc=dwmw2@infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=marek.vasut@gmail.com \
--cc=miquel.raynal@bootlin.com \
--cc=richard@nod.at \
--cc=stable@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox