Re: [PATCH v1] mtd: parsers: ofpart: Fix parsing when size-cells is 0

Francesco Dolcini
2022-12-02T10:14:12Z

Hello Miquel,

On Fri, Dec 02, 2022 at 10:14:18AM +0100, Miquel Raynal wrote:
> francesco@dolcini.it wrote on Fri, 2 Dec 2022 08:19:00 +0100:
> > From: Francesco Dolcini <francesco.dolcini@toradex.com>
> >
> > Add a fallback mechanism to handle the case in which #size-cells is set
> > to <0>. According to the DT binding the nand controller node should have
> > set it to 0 and this is not compatible with the legacy way of
> > specifying partitions directly as child nodes of the nand-controller node.
>
> I understand the problem, I understand the fix, but I have to say, I
> strongly dislike it :) Touching an mtd core driver to fix a single
> broken use case like that is... problematic, for the least.
I just noticed it 2 days after this patch was backported to a stable
kernel, I am just the first one to notice, we are not talking about a single
use case.

> I am sorry but if a 6.0 kernel breaks because:
Not only kernel 6.0 is currently broken. This patch is going to be
backported to any stable kernel given the fixes tag it has.

> If you really want to workaround U-Boot, either you revert that patch
> or you just fix the DT description instead. The parent/child/partitions
> scheme has been enforced for maybe 5 years now and for a good reason: a
> NAND controller with partitions does not make _any_ sense. There are
> plenty of examples out there, imx7-colibri.dtsi has received many
> updates since its introduction (for the best), so why not this one?

I can and I will update imx7-colibri.dtsi (patch coming), but is this
good enough given the kind of boot failure regression this introduce? We
are going to have old u-boot around that will not work with it, and the
reality is that there are tons of reasons why people do update the linux
kernel and dts everyday, but never ever update the bootloader.

We cannot tell
"All users of the XXX kernel series must upgrade."
and at the same time introduce a regression that break the boot and
ignore it.

Francesco