lkml.org 
[lkml]   [2015]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 2/5] mtd: mtdpart: Do not fail mtd probe when parsing partitions fails.
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 <computersforpeace@gmail.com>
> 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 <hramrach@gmail.com>
> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
> ---
> 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


\
 
 \ /
  Last update: 2015-10-27 03:01    [W:0.027 / U:1.580 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site