From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.free-electrons.com ([62.4.15.54]) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eKPDA-00082C-5C for linux-mtd@lists.infradead.org; Thu, 30 Nov 2017 13:49:09 +0000 Date: Thu, 30 Nov 2017 14:48:39 +0100 From: Miquel RAYNAL To: Masahiro Yamada Cc: Boris Brezillon , Thomas Petazzoni , Mark Rutland , Kamal Dasu , Richard Weinberger , Antoine Tenart , Cyrille Pitchen , Stefan Agner , Wenyou Yang , Nadav Haklai , Marek Vasut , David Woodhouse , Rob Herring , linux-mtd , Ezequiel Garcia , Gregory Clement , Han Xu , Brian Norris , Robert Jarzmik , Josh Wu Subject: Re: [RFC PATCH v2 1/6] mtd: nand: provide several helpers to do common NAND operations Message-ID: <20171130144839.08b8b7ce@xps13> In-Reply-To: References: <20171107145419.22717-1-miquel.raynal@free-electrons.com> <20171107145419.22717-2-miquel.raynal@free-electrons.com> <20171130091831.06781ce2@bbrezillon> 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 Sean, Boris, > >> Theoretically, there could be three cases: > >> [1] INTR__ERASE_COMP interrupt is asserted > >> [2] INTR__ERASE_FAIL interrupt is asserted > >> [3] Nothing is asserted (bailout by timeout) =20 > > > > Well, ideally we should have something like: > > > > if (irq_status & INTR__ERASE_COMP) > > return 0; > > else if (irq_status & INTR__ERASE_FAIL) > > return -EIO; > > > > return -ETIMEDOUT; > > > > But let's keep the existing behavior (return -EIO in case of > > timeout).=20 >=20 >=20 > I agree with this change, > but it should also be done in a separate work. >=20 >=20 Ok, I will stick to Boris' first solution and put this aside. Patches will come very soon. Thank you both, Miqu=C3=A8l