Re: [PATCH 5/5] net: mtip: The L2 switch driver for imx287
From: Lukasz Majewski
Date: Tue Mar 25 2025 - 13:30:32 EST
Hi Krzysztof,
> On 25/03/2025 17:38, Lukasz Majewski wrote:
> >>>>
> >>>> I don't understand this code. Do you want to re-implement
> >>>> get_optional? But why?
> >>>
> >>> Here the get_optional() shall be used.
> >>
> >> This is the problem with trying to use old code. It needs more work
> >> than just making it compile. It needs to be brought up to HEAD of
> >> mainline standard, which often nearly ends in a re-write.
> >
> > But you cannot rewrite this code from scratch, as the IP block is
> > not so well documented, and there maybe are some issues that you
> > are not aware of.
> >
> > Moreover, this code is already in production use, and you don't
> > want to be in situation when regression tests cannot be run.
>
> This is a good reason to add it to staging, but not to mainline. Just
> because someone has somewhere products with poor code is not the
> reason to accept that poor code.
I've tried to upstream this driver several times. Attempts were
made for 4.19 and 5.12. The reason the code was not accepted was that
conceptually the code had to be written in a different way (exact
discussion is available [1]).
What I've tried to say above - was that I need to have working device
at any point of development.
And, yes "upstream first" is a great policy, but imx287 based HW was in
the kernel long time ago.
> Otherwise all the people and
> companies who upstream BEFORE would be quite disappointed. Why anyone
> would care to work on upstreaming BEFORE hardware release,
Yes, this shall be appreciated.
> if you can
> ship whatever to production and then ask mainline to pick up "because
> it is in production use".
Where I've stated this?
My point is that for regression testing I prefer to gradually update
the code and not start from scratch.
I do appreciate your and Andrew's feedback and try to make the driver
eligible for upstreaming.
To sum up:
##########
- Yes, I'm aware that this code needs some more adjustments/update
- Yes, fsl,fec.yaml was the wrong file to use as a starting point
- Yes, bindings are ABI and shall be done right (that was one of the
reason the driver from 5.12 was not accepted).
Links:
[1] - https://lore.kernel.org/netdev/20210629140104.70a3da1a@ktm/T/
>
> Best regards,
> Krzysztof
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@xxxxxxx
Attachment:
pgpdl4SztVj3k.pgp
Description: OpenPGP digital signature