From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.bootlin.com ([62.4.15.54]:44855 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726027AbeJBEVV (ORCPT ); Tue, 2 Oct 2018 00:21:21 -0400 Date: Mon, 1 Oct 2018 23:41:20 +0200 From: Boris Brezillon To: Chris Packham Cc: Daniel Mack , Miquel Raynal , "linux-mtd@lists.infradead.org" , "stable@vger.kernel.org" Subject: Re: [PATCH v2] mtd: rawnand: marvell: check for RDY bits after enabling the IRQ Message-ID: <20181001234120.425ae1f5@bbrezillon> In-Reply-To: <20181001223438.08a9d8c0@bbrezillon> References: <20180927071751.21513-1-daniel@zonque.org> <20180927101145.4c2d1159@xps13> <20180927105630.19fc1ff8@bbrezillon> <9b32fe67-c6fb-5f8c-d97a-4419557e6768@zonque.org> <20180928102454.325644f3@xps13> <692a1133-59d1-ae45-fa06-2a684e94c350@zonque.org> <3d7b337f701c45caa35aef94f8d93731@svr-chch-ex1.atlnz.lc> <227028c0-e1e0-46b3-3c7d-2b242b31bb3f@zonque.org> <59f9c342cf8140979329aa269aa0c2eb@svr-chch-ex1.atlnz.lc> <20181001223438.08a9d8c0@bbrezillon> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: stable-owner@vger.kernel.org List-ID: On Mon, 1 Oct 2018 22:34:38 +0200 Boris Brezillon wrote: > > > > I'd previously tried readl() based on the same hunch. No change. > > > > I think my snippet above might be misleading. While a delay between > > readl_relaxed() and the if should not change the outcome, this is also a > > delay between marvell_nfc_enable_int() and marvell_nfc_disable_int() > > which is probably more significant. Sure enough if I move the delay to > > just before the marvell_nfc_disable_int() the error is not seen. > > AFAICT, your timeout always happens when waiting for RDREQ, not RDYM. > So maybe disabling MRDY too early has a side-effect on the RDREQ event. Can you try with this patch [1]? It should ensure that NDSR_RDY bits are cleared before starting an operation. [1]http://code.bulix.org/lgs30c-468205