Re: [PATCH 0/2] net: phy: broadcom: RGMII delays fixes

From: Andrew Lunn
Date: Thu Oct 03 2019 - 16:10:39 EST


On Thu, Oct 03, 2019 at 10:54:26PM +0300, Vladimir Oltean wrote:
> Hi Andrew,
>
> On Thu, 3 Oct 2019 at 22:06, Andrew Lunn <andrew@xxxxxxx> wrote:
> >
> > On Thu, Oct 03, 2019 at 11:55:40AM -0700, Florian Fainelli wrote:
> > > Hi Andrew,
> > >
> > > On 10/3/19 11:51 AM, Andrew Lunn wrote:
> > > > On Thu, Oct 03, 2019 at 11:43:50AM -0700, Florian Fainelli wrote:
> > > >> Hi all,
> > > >>
> > > >> This patch series fixes the BCM54210E RGMII delay configuration which
> > > >> could only have worked in a PHY_INTERFACE_MODE_RGMII configuration.
> > > >
> > > > Hi Florian
> > > >
> > > > So any DT blob which incorrectly uses one of the other RGMII modes is
> > > > now going to break, where as before it was ignored.
> > >
> > > Potentially yes. There is a precedent with the at803x PHY driver
> >
> > Hi Florian
> >
> > Yes that was an interesting learning experience. I'm not sure we want
> > to do that again. A lot of devices broken, and a lot of people were
> > unhappy.
> >
> > If we are looking at a similar scale of breakage, i think i would
> > prefer to add a broadcom,bcm54210e-phy-mode property in the DT which
> > if present would override the phy_interface_t passed to the driver.
> >
> > Andrew
>
> What is the breakage concern here?

With the at803x, we had a lot of devices which said rgmii in there DT,
but actually needed rgmii-id. The driver however did not do anything,
and the silicon defaulted to rgmii-id, so things just worked, the two
bugs cancelling each other out.

Then a board come along which really did need rgmii. Adding support to
actually correctly configure the RGMII delays then broke all the
boards with the wrong value in DT.

> But in this case, the only breakage would be "hmmm, let's just enable
> RGMII delays everywhere. So it works with rgmii-id on both the PHY and
> the MAC side of things? Great, time for lunch!". I just hope that did
> not happen.

That is my hope as well. But letting it sit in net-next for a while
might help confirm that hope. As i said, at803x was painful, and i
would like to avoid that again. So i'm being more cautious.

Andrew