Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751698AbbHPWWU (ORCPT ); Sun, 16 Aug 2015 18:22:20 -0400 Received: from smtp01.smtpout.orange.fr ([80.12.242.123]:38719 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751238AbbHPWWT (ORCPT ); Sun, 16 Aug 2015 18:22:19 -0400 X-ME-Helo: belgarion X-ME-Auth: amFyem1pay5yb2JlcnRAb3JhbmdlLmZy X-ME-Date: Mon, 17 Aug 2015 00:22:16 +0200 X-ME-IP: 90.5.13.86 From: Robert Jarzmik To: Ezequiel Garcia Cc: Ezequiel Garcia , David Woodhouse , Brian Norris , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, Antoine Tenart Subject: Re: [PATCH] mtd: nand: pxa3xx-nand: fix random command timeouts References: <1439396538-13298-1-git-send-email-robert.jarzmik@free.fr> <20150816152924.GA799@laptop.cereza> X-URL: http://belgarath.falguerolles.org/ Date: Mon, 17 Aug 2015 00:18:09 +0200 In-Reply-To: <20150816152924.GA799@laptop.cereza> (Ezequiel Garcia's message of "Sun, 16 Aug 2015 12:29:27 -0300") Message-ID: <87si7iandq.fsf@belgarion.home> User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1560 Lines: 43 Ezequiel Garcia writes: > On 12 Aug 06:22 PM, Robert Jarzmik wrote: > > This fix looks correct. Thanks! > > Couple questions: > > 1. In which platform are you seeing this bug? zylonite with a pxa310 (ie. internal stacked NAND). > 2. Is this a regression? (i.e. should we queue it for -stable?) No, it's been there for ages I think. > Also, one might question why we can't just write NDSR right after it's read, > before we wake the IRQ thread or start DMA. It appears this is > a requirement of BCH, as per the comment in drain_fifo. For irq thread that won't make any difference, the irq handler will finish first and clear the bits anyway. For DMA it's better. And more generaly speaking, I like it better, to clear it once read. > It would be nice to put a comment explaining why we clear NDSR only > before the check to WRCMDREQ. Maybe even copy-pasting something > from the commit log? If we move it up to something like that : status = nand_readl(info, NDSR); nand_writel(info, NDSR, status); Then the comment is overkill I think. > I'd like to say "Yay, let's pick it" but I'd like to make sure this is > tested on all platforms first (unless you've tested it already). I tested on zylonite (where bug occurs) and cm-x300 (where bug never occurs). Cheers. -- Robert -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/