RE: [PATCH] MTD: fix partition scan control logic in physmap_ofand fsl_elbc_nand
From: Li Yang <hidden>
Date: 2008-04-25 11:10:09
-----Original Message----- From: David Woodhouse [mailto:dwmw2@infradead.org]=20 Sent: Wednesday, April 23, 2008 2:49 AM To: Li Yang Cc: linux-mtd@lists.infradead.org; Stefan Roese;=20 linuxppc-dev@ozlabs.org Subject: Re: [PATCH] MTD: fix partition scan control logic in=20 physmap_ofand fsl_elbc_nand =20 On Thu, 2008-02-28 at 20:17 +0800, Li Yang wrote:quoted
The generic rule for partition scan is to try all supported=20partition=20quoted
types before an usable partition table is found. However the original code returns unsuccessful when there=20is an error=20quoted
in any of the partition types. =20 Signed-off-by: Li Yang <redacted> Cc: Stefan Roese <sr@denx.de> Cc: Peter Korsgaard <jacmet@sunsite.dk> --- I later found that Stefan has proposed a similar patch for=20physmap_of=20quoted
and Peter proposed another patch to fix cmdlinepart instead. I'd say that even after cmdlinepart patch is applied the=20scan control=20quoted
logic still needs to be fixed.=20 I'm not convinced. I think the partition code should return=20 an error if it hits a hard error, like a failure to read from=20 the device. And return zero when it doesn't find anything.
The error can also be soft error like a typo in the cmdline or device tree. I could be better to try other ways to see if we can find a sane partition table than just to fail. - Leo