OSDN Git Service

net: macb: use .mac_select_pcs() interface
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Wed, 5 Jan 2022 13:15:15 +0000 (13:15 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 6 Jan 2022 12:31:49 +0000 (12:31 +0000)
commit8876769bf93687d8b17d8143d39ca7a1aaeaecc6
tree458f3c35754bd75682141956f1eabad15e28025e
parenteac1b93c14d645ef147b049ace0d5230df755548
net: macb: use .mac_select_pcs() interface

Convert the PCS selection to use mac_select_pcs, which allows the PCS
to perform any validation it needs.

We must use separate phylink_pcs instances for the USX and SGMII PCS,
rather than just changing the "ops" pointer before re-setting it to
phylink as this interface queries the PCS, rather than requesting it
to be changed.

Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cadence/macb.h
drivers/net/ethernet/cadence/macb_main.c