Re: [PATCH v2] net: dsa: ksz8795: adjust CPU link to host interface

From: Andrew Lunn
Date: Mon Dec 07 2020 - 21:12:18 EST


On Mon, Dec 07, 2020 at 08:43:32PM +0100, Jean Pihet wrote:
> Hi Andrew,
>
> On Tue, Dec 1, 2020 at 9:45 PM Andrew Lunn <andrew@xxxxxxx> wrote:
> >
> > > Configure the host port of the switch to match the host interface
> > > settings. This is useful when the switch is directly connected to the
> > > host MAC interface.
> >
> > Why do you need this when no other board does? Why is your board
> > special?
> >
> > As i said before, i'm guessing your board has back to back PHYs
> > between the SoC and the switch and nobody else does. Is that the
> > reason why? Without this, nothing is configuring the switch MAC to the
> > results of the auto-neg between the two PHYs?
>
> Yes that is the case. From here I see this patch is too specific to
> our setup, and so cannot be considered for merging.

Hi Jean

I never said i was too specific to your board. There are other boards
using different switches like this. This is where the commit message
is so important. Without understanding Why? it is hard to point you in
the right direction.

So you setup is:

SoC - MAC - PHY - PHY - MAC - Switch.

The SoC MAC driver is looking after the first PHY?

This patch is about the Switch MAC and PHY. You need the results of
auto-neg from the PHY to be programmed into the MAC of the switch.

If i remember correctly you just need a phy-handle in the CPU node,
pointing at the PHY. See for example imx6q-b450v3.dts

Andrew