Subject: Re: [PATCH net-next 2/2] net: phy: add keep_data_connection to struct phydev

From: Jakub Kicinski <[email-masked]>
Date: Wed, 26 Jul 2023 09:08:12 -0700

Sorry for chiming in, hopefully the comments are helpful..

On Wed, 26 Jul 2023 10:54:25 +0200 Andrew Lunn wrote:
> As far as i understand it, the host MAC is actually a switch, with the
> BMC connected to the second port of the switch.

Not a learning switch (usually, sigh), but yes.

> Does the BMC care about the PHY status?
> Does it need to know about link status? 

Yes, NIC sends link state notifications over the NCSI "link?" (which 
is a separate RGMII?/RMII from NIC to the BMC). BMC can select which
"channel" (NIC port) it uses based on PHY status.

> Does the NCSI core on the host need to know about the PHY?

There is no NCSI core on the host.. Hosts are currently completely
oblivious to NCSI. The NCSI we have in tree is for the BMC, Linux
running on the BMC (e.g. OpenBMC).

> You might want to take a step back and think about this in general. Do
> we need to extend the phylink core to support NCSI? Do we need an API
> for NCSI?

Today it's mostly configured via "BIOS". But I think letting user know
that the link is shared with NCSI would be useful.

Last week someone was asking me why a certain NIC is "weird and shuts
down its PHY when ifdown'ed". I'm guessing some sysadmins may be so used
to NCSI keeping links up they come to expect it, without understanding
why it happens :(