From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.bootlin.com ([62.4.15.54]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fI904-0000oJ-CO for linux-mtd@lists.infradead.org; Mon, 14 May 2018 08:38:46 +0000 Date: Mon, 14 May 2018 10:38:19 +0200 From: Miquel Raynal To: Boris Brezillon Cc: Richard Weinberger , linux-mtd@lists.infradead.org, Chris Packham , David Woodhouse , Brian Norris , Marek Vasut , stable@vger.kernel.org Subject: Re: [PATCH] mtd: rawnand: marvell: Fix read logic for layouts with ->nchunks > 2 Message-ID: <20180514103819.57dda077@xps13> In-Reply-To: <20180509071358.12157-1-boris.brezillon@bootlin.com> References: <20180509071358.12157-1-boris.brezillon@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hi Boris, On Wed, 9 May 2018 09:13:58 +0200, Boris Brezillon wrote: > The code is doing monolithic reads for all chunks except the last one > which is wrong since a monolithic read will issue the > READ0+ADDRS+READ_START sequence. It not only takes longer because it > forces the NAND chip to reload the page content into its internal > cache, but by doing that we also reset the column pointer to 0, which > means we'll always read the first chunk instead of moving to the next > one. >=20 > Rework the code to do a monolithic read only for the first chunk, > then switch to naked reads for all intermediate chunks and finally > issue a last naked read for the last chunk. >=20 > Fixes: 02f26ecf8c77 mtd: nand: add reworked Marvell NAND controller driver > Cc: stable@vger.kernel.org > Reported-by: Chris Packham > Signed-off-by: Boris Brezillon > Tested-by: Chris Packham > --- I'm surprised not to have spotted this while testing the 4k pages-8b/512B strength layout. Probably something I changed during the review process and forgot to test again. Acked-by: Miquel Raynal Thanks, Miqu=C3=A8l