From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752323AbcAFWxm (ORCPT ); Wed, 6 Jan 2016 17:53:42 -0500 Received: from mail-pa0-f50.google.com ([209.85.220.50]:36485 "EHLO mail-pa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752081AbcAFWxj (ORCPT ); Wed, 6 Jan 2016 17:53:39 -0500 Date: Wed, 6 Jan 2016 14:53:36 -0800 From: Brian Norris To: linux-mtd@lists.infradead.org Cc: Boris Brezillon , =?iso-8859-1?B?U/hyZW5zZW4s?= Stefan , Heiko Schocher , Frans Klaver , linux-kernel@vger.kernel.org Subject: Re: [PATCH for-4.5 v2] mtd: nand: assign reasonable default name for NAND drivers Message-ID: <20160106225336.GK109450@google.com> References: <1452019185-134498-1-git-send-email-computersforpeace@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1452019185-134498-1-git-send-email-computersforpeace@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 05, 2016 at 10:39:45AM -0800, Brian Norris wrote: > Commits such as commit 853f1c58c4b2 ("mtd: nand: omap2: show parent > device structure in sysfs") attempt to rely on the core MTD code to set > the MTD name based on the parent device. However, nand_base tries to set > a different default name according to the flash name (e.g., extracted > from the ONFI parameter page), which means NAND drivers will never make > use of the MTD defaults. This is not the intention of commit > 853f1c58c4b2. > > This results in problems when trying to use the cmdline partition > parser, since the MTD name is different than expected. Let's fix this by > providing a default NAND name, where possible. > > Note that this is not really a great default name in the long run, since > this means that if there are multiple MTDs attached to the same > controller device, they will have the same name. But that is an existing > issue and requires future work on a better controller vs. flash chip > abstraction to fix properly. > > Fixes: 853f1c58c4b2 ("mtd: nand: omap2: show parent device structure in sysfs") > Reported-by: Heiko Schocher > Signed-off-by: Brian Norris > Reviewed-by: Boris Brezillon > Tested-by: Heiko Schocher > Cc: Heiko Schocher > Cc: Frans Klaver > Cc: > --- > v2: > * target 4.5, as 4.4 is getting late > * add -stable tags > * move assignment directly into nand_scan_ident() (nand_set_defaults() has a > slightly different purpose and gets reused, so it's not as good of a > candidate) Applied to l2-mtd.git, for 4.5 (+ stable)