From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752516AbcBYX1N (ORCPT ); Thu, 25 Feb 2016 18:27:13 -0500 Received: from a.ns.miles-group.at ([95.130.255.143]:11949 "EHLO radon.swed.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750984AbcBYX1M (ORCPT ); Thu, 25 Feb 2016 18:27:12 -0500 Subject: Re: [PATCH v7] mtd: nand: increase ready wait timeout and report timeouts To: Boris Brezillon , Brian Norris References: <1444139527-14087-1-git-send-email-harvey.hunt@imgtec.com> <20160225231432.GN21465@google.com> <20160226002302.2f56f1a9@bbrezillon> Cc: Harvey Hunt , IMG-MIPSLinuxKerneldevelopers@imgtec.com, Alex Smith , Alex Smith , Zubair Lutfullah Kakakhel , David Woodhouse , Niklas Cassel , "linux-mtd@lists.infradead.org" , LKML From: Richard Weinberger Message-ID: <56CF8DCA.7010606@nod.at> Date: Fri, 26 Feb 2016 00:27:06 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <20160226002302.2f56f1a9@bbrezillon> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 26.02.2016 um 00:23 schrieb Boris Brezillon: >> Regardless, this timeout loop is wrong. Shouldn't it have something like >> the following? >> >> diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c >> index f2c8ff398d6c..596a9b0503da 100644 >> --- a/drivers/mtd/nand/nand_base.c >> +++ b/drivers/mtd/nand/nand_base.c >> @@ -566,8 +566,8 @@ void nand_wait_ready(struct mtd_info *mtd) >> cond_resched(); >> } while (time_before(jiffies, timeo)); >> >> - pr_warn_ratelimited( >> - "timeout while waiting for chip to become ready\n"); >> + if (!chip->dev_ready(mtd)) >> + pr_warn_ratelimited("timeout while waiting for chip to become ready\n"); >> out: >> led_trigger_event(nand_led_trigger, LED_OFF); >> } > > Looks good to me. > > If you post the patch, you can add > > Reviewed-by: Boris Brezillon Same here. Reviewed-by: Richard Weinberger Thanks, //richard