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@xxxxxxxxxxxxxxxxxxxxxx/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.