Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752040AbdFHHdE (ORCPT ); Thu, 8 Jun 2017 03:33:04 -0400 Received: from conssluserg-05.nifty.com ([210.131.2.90]:28604 "EHLO conssluserg-05.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751873AbdFHHdB (ORCPT ); Thu, 8 Jun 2017 03:33:01 -0400 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-05.nifty.com v587Wnuw007000 X-Nifty-SrcIP: [209.85.161.181] MIME-Version: 1.0 In-Reply-To: <20170607152658.51c90ba9@bbrezillon> References: <1496836352-8016-1-git-send-email-yamada.masahiro@socionext.com> <1496836352-8016-7-git-send-email-yamada.masahiro@socionext.com> <20170607152658.51c90ba9@bbrezillon> From: Masahiro Yamada Date: Thu, 8 Jun 2017 16:32:48 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v5 06/23] mtd: nand: denali: set NAND_ECC_CUSTOM_PAGE_ACCESS To: Boris Brezillon Cc: Cyrille Pitchen , Richard Weinberger , Marek Vasut , David Woodhouse , Chuanxiao Dong , Linux Kernel Mailing List , Dinh Nguyen , linux-mtd@lists.infradead.org, Masami Hiramatsu , Artem Bityutskiy , Jassi Brar , Brian Norris , Enrico Jorns Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1326 Lines: 39 Hi Boris 2017-06-07 22:26 GMT+09:00 Boris Brezillon : > On Wed, 7 Jun 2017 20:52:15 +0900 > Masahiro Yamada wrote: > >> The denali_cmdfunc() actually does nothing valuable for >> NAND_CMD_{PAGEPROG,READ0,SEQIN}. >> >> For NAND_CMD_{READ0,SEQIN}, it copies "page" to "denali->page", then >> denali_read_page() and denali_read_page_raw() compare them to check >> if the NAND framework called the callbacks in correct order. >> (Inconsistently, this check is missing from the denali_write_page() >> and denali_write_page_raw().) >> >> The framework is widely tested by many drivers, so this kind of >> sanity check is unneeded. The Denali controller is equipped with >> high level interface for read/write, so let's skip unneeded call >> of cmdfunc(). > > I recently changed the semantic of ecc->write_page[_raw]() when > NAND_ECC_CUSTOM_PAGE_ACCESS is set [1]. I'm not sure your driver waits > for the program command to finish. > I think you should wait for INTR_STATUS__PROGRAM_COMP instead of > INTR_STATUS__DMA_CMD_COMP in write_page() [2], as is done in > write_oob_data(). Thanks for the pointer. I missed your commit because I usually develop based on Linus' tree instead of linux-next. I will fix this commit. -- Best Regards Masahiro Yamada