]> git.baikalelectronics.ru Git - kernel.git/commit
net: phylink: add mac_select_pcs() method to phylink_mac_ops
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Wed, 15 Dec 2021 15:34:15 +0000 (15:34 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 16 Dec 2021 10:37:13 +0000 (10:37 +0000)
commit6612cd74d7f23bd182bf8889146318fb44e9bef8
treef988a358dd1df49c76c2bd440bf8e2e01123fe98
parent7d3ac48226fac5ffce9b227ca0b565fc55c78b10
net: phylink: add mac_select_pcs() method to phylink_mac_ops

mac_select_pcs() allows us to have an explicit point to query which
PCS the MAC wishes to use for a particular PHY interface mode, thereby
allowing us to add support to validate the link settings with the PCS.

Phylink will also use this to select the PCS to be used during a major
configuration event without the MAC driver needing to call
phylink_set_pcs().

Note that if mac_select_pcs() is present, the supported_interfaces
bitmap must be filled in; this avoids mac_select_pcs() being called
with PHY_INTERFACE_MODE_NA when we want to get support for all
interface types. Phylink will return an error in phylink_create()
unless this condition is satisfied.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phylink.c
include/linux/phylink.h