Re: [PATCH net-next v4 06/11] net: stmmac: resetup XPCS according to the new interface mode

Choong Yong Liang
2024-02-01T05:10:26Z

On 30/1/2024 6:21 pm, Russell King (Oracle) wrote:
> NAK. Absolutely not. You haven't read the phylink documentation, nor
> understood how phylink works.
>
> Since you haven't read the phylink documentation, I'm not going to
> waste any more time reviewing this series since you haven't done your
> side of the bargin here.
>
Hi Russell,

Sorry that previously I only studied the phylink based on the `phylink.h`
itself. I think it might not be sufficient. I did search through the
internet and found the phylink document from kernel.org
(https://docs.kernel.org/networking/sfp-phylink.html). Kindly let me know
if there are any other phylink documents I might have overlooked.

According to the phylink document from kernel.org, it does mention that
"phylink is a mechanism to support hot-pluggable networking modules
directly connected to a MAC without needing to re-initialise the adapter on
hot-plug events." I realize I should not destroy and reinitialize the PCS.
Instead, I plan to follow the implementation in "net: macb: use
.mac_select_pcs() interface"
(https://lore.kernel.org/netdev/E1n568J-002SZX-Gr@rmk-PC.armlinux.org.uk/T/).
This involves initializing the required PCS during the MAC probe and
querying the PCS based on the interface.

Kindly let me know if I've overlooked anything in this proposed solution.