From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753531AbbJ0Boz (ORCPT ); Mon, 26 Oct 2015 21:44:55 -0400 Received: from mail-pa0-f43.google.com ([209.85.220.43]:32820 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753420AbbJ0Bow (ORCPT ); Mon, 26 Oct 2015 21:44:52 -0400 Date: Mon, 26 Oct 2015 18:44:48 -0700 From: Brian Norris To: Michal Suchanek Cc: Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , David Woodhouse , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org Subject: Re: [PATCH v3 2/5] mtd: mtdpart: Do not fail mtd probe when parsing partitions fails. Message-ID: <20151027014448.GN13239@google.com> References: <97366073dfe93b478f24e2fc30ca818326906e0a.1439911625.git.hramrach@gmail.com> <20151011200347.GD3696@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151011200347.GD3696@localhost> 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 Sun, Oct 11, 2015 at 01:03:47PM -0700, Brian Norris wrote: > All in all, I think my suggestions would look something like the > following alternative patch. I haven't tested it yet. > > Brian > > (git-format-patch pasted below) > > From 53b60f31a2a0f2a7e8220a4aff47457248bccbcf Mon Sep 17 00:00:00 2001 > From: Brian Norris > Date: Sun, 11 Oct 2015 10:25:23 -0700 > Subject: [PATCH] mtd: mtdpart: Do not fail mtd probe when parsing partitions > fails. > > Due to wrong assumption in ofpart ofpart fails on Exynos on SPI chips > with no partitions because the subnode containing controller data > confuses the ofpart parser. > > Thus compiling in ofpart support automatically fails probing any SPI NOR > flash without partitions on Exynos. > > Compiling in a partitioning scheme should not cause probe of otherwise > valid device to fail. > > Instead, let's do the following: > * try parsers until one succeeds > * if no parser succeeds, report the first error we saw > * even in the failure case, allow MTD to probe, with fallback > partitions or no partitions at all -- the master device will still be > registered > > Issue report and comments initially by Michal Suchanek. > > Reported-by: Michal Suchanek > Signed-off-by: Brian Norris > --- > drivers/mtd/mtdcore.c | 6 ++++-- > drivers/mtd/mtdpart.c | 14 ++++++++++---- > 2 files changed, 14 insertions(+), 6 deletions(-) Tested, and applied this version to l2-mtd.git