From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.bootlin.com ([62.4.15.54]) by merlin.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fIW1j-0003S9-Dv for linux-mtd@lists.infradead.org; Tue, 15 May 2018 09:13:49 +0000 Date: Tue, 15 May 2018 11:13:20 +0200 From: Boris Brezillon To: Miquel Raynal Cc: Richard Weinberger , stable@vger.kernel.org, Marek Vasut , Chris Packham , linux-mtd@lists.infradead.org, Brian Norris , David Woodhouse Subject: Re: [PATCH] mtd: rawnand: marvell: Fix read logic for layouts with ->nchunks > 2 Message-ID: <20180515111320.482e700a@bbrezillon> In-Reply-To: <20180514103819.57dda077@xps13> References: <20180509071358.12157-1-boris.brezillon@bootlin.com> <20180514103819.57dda077@xps13> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Mon, 14 May 2018 10:38:19 +0200 Miquel Raynal wrote: > 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. > > > > 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. > > > > 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 Applied.