All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch "mtd: nand: assign reasonable default name for NAND drivers" has been added to the 4.4-stable tree
@ 2016-02-13 22:46 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-02-13 22:46 UTC (permalink / raw)
  To: computersforpeace, boris.brezillon, fransklaver, gregkh, hs
  Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    mtd: nand: assign reasonable default name for NAND drivers

to the 4.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     mtd-nand-assign-reasonable-default-name-for-nand-drivers.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From f7a8e38f07a17be90758559fe66fe7337096053f Mon Sep 17 00:00:00 2001
From: Brian Norris <computersforpeace@gmail.com>
Date: Tue, 5 Jan 2016 10:39:45 -0800
Subject: mtd: nand: assign reasonable default name for NAND drivers

From: Brian Norris <computersforpeace@gmail.com>

commit f7a8e38f07a17be90758559fe66fe7337096053f upstream.

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 <hs@denx.de>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Tested-by: Heiko Schocher <hs@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Frans Klaver <fransklaver@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/mtd/nand/nand_base.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -3995,6 +3995,9 @@ int nand_scan_ident(struct mtd_info *mtd
 			return ret;
 	}
 
+	if (!mtd->name && mtd->dev.parent)
+		mtd->name = dev_name(mtd->dev.parent);
+
 	/* Set the default functions */
 	nand_set_defaults(chip, chip->options & NAND_BUSWIDTH_16);
 


Patches currently in stable-queue which might be from computersforpeace@gmail.com are

queue-4.4/mtd-nand-assign-reasonable-default-name-for-nand-drivers.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-02-13 22:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-13 22:46 Patch "mtd: nand: assign reasonable default name for NAND drivers" has been added to the 4.4-stable tree gregkh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.