From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eusmtp01.atmel.com ([212.144.249.243]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X84xX-0006BP-Lv for linux-mtd@lists.infradead.org; Fri, 18 Jul 2014 10:00:12 +0000 Message-ID: <53C8F011.7020507@atmel.com> Date: Fri, 18 Jul 2014 17:59:45 +0800 From: Josh Wu MIME-Version: 1.0 To: Brian Norris , Thomas Petazzoni Subject: Re: [PATCH] mtd: nand: reduce the warning noise when the ECC is too weak References: <1404306992-28968-1-git-send-email-thomas.petazzoni@free-electrons.com> <20140714052259.GD29385@norris-Latitude-E6410> In-Reply-To: <20140714052259.GD29385@norris-Latitude-E6410> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Cc: Lior Amsalem , Tawfik Bayouk , Nadav Haklai , linux-mtd@lists.infradead.org, Ezequiel Garcia , David Woodhouse List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hi, Brian On 7/14/2014 1:22 PM, Brian Norris wrote: > On Wed, Jul 02, 2014 at 03:16:32PM +0200, Thomas Petazzoni wrote: >> In commit 67a9ad9b8a6f ("mtd: nand: Warn the user if the selected ECC >> strength is too weak"), a check was added to inform the user when the >> ECC used for a NAND device is weaker than the recommended ECC >> advertised by the NAND chip. However, the warning uses WARN_ON(), >> which has two undesirable side-effects: >> >> - It just prints to the kernel log the fact that there is a warning >> in this file, at this line, but it doesn't explain anything about >> the warning itself. >> >> - It dumps a stack trace which is very noisy, for something that the >> user is most likely not able to fix. If a certain ECC used by the >> kernel is weaker than the advertised one, it's most likely to make >> sure the kernel uses an ECC that is compatible with the one used by >> the bootloader, and changing the bootloader may not necessarily be >> easy. Therefore, normal users would not be able to do anything to >> fix this very noisy warning, and will have to suffer from it at >> every kernel boot. At least every time I see this stack trace in my >> kernel boot log, I wonder what new thing is broken, just to realize >> that it's once again this NAND ECC warning. >> >> Therefore, this commit turns: >> >> ------------[ cut here ]------------ >> WARNING: CPU: 0 PID: 1 at /home/thomas/projets/linux-2.6/drivers/mtd/nand/nand_base.c:4051 nand_scan_tail+0x538/0x780() >> Modules linked in: >> CPU: 0 PID: 1 Comm: swapper Not tainted 3.16.0-rc3-dirty #4 >> [] (unwind_backtrace) from [] (show_stack+0x10/0x14) >> [] (show_stack) from [] (warn_slowpath_common+0x6c/0x8c) >> [] (warn_slowpath_common) from [] (warn_slowpath_null+0x1c/0x24) >> [] (warn_slowpath_null) from [] (nand_scan_tail+0x538/0x780) >> [] (nand_scan_tail) from [] (orion_nand_probe+0x224/0x2e4) >> [] (orion_nand_probe) from [] (platform_drv_probe+0x18/0x4c) >> [] (platform_drv_probe) from [] (really_probe+0x80/0x218) >> [] (really_probe) from [] (__driver_attach+0x98/0x9c) >> [] (__driver_attach) from [] (bus_for_each_dev+0x64/0x94) >> [] (bus_for_each_dev) from [] (bus_add_driver+0x144/0x1ec) >> [] (bus_add_driver) from [] (driver_register+0x78/0xf8) >> [] (driver_register) from [] (platform_driver_probe+0x20/0xb8) >> [] (platform_driver_probe) from [] (do_one_initcall+0x80/0x1d8) >> [] (do_one_initcall) from [] (kernel_init_freeable+0xf4/0x1b4) >> [] (kernel_init_freeable) from [] (kernel_init+0x8/0xec) >> [] (kernel_init) from [] (ret_from_fork+0x14/0x24) >> ---[ end trace 62f87d875aceccb4 ]--- >> >> Into the much shorter, and much more useful: >> >> nand: WARNING: MT29F2G08ABAEAWP: the ECC used on your system is too weak compared to the one required by the NAND chip >> >> Signed-off-by: Thomas Petazzoni > Pushed to linux-mtd.git, for 3.16 I think. Thanks! Excuse me that to ask a question which is not related with the code. I find this fix is not in l2-mtd.git but only in linux-mtd.git. So I wondering how the patch is merged in linux mainline and stable tree. Will the linux-mtd.git be merged in linux mainline and stable git tree before v3.16 release? So the l2-mtd.git can rebase on the merged tag. Am I understand the flow correctly? Thanks in advance. Best Regards, Josh Wu > > Brian > > ______________________________________________________ > Linux MTD discussion mailing list > http://lists.infradead.org/mailman/listinfo/linux-mtd/