mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 17:13:52 +02:00
net: pcs: pcs-lynx: implement pcs_inband_caps() method
Report the PCS in-band capabilities to phylink for the Lynx PCS. Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tJ8NM-006L5J-AH@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
3ca459eaba
commit
6561f0e547
|
|
@ -35,6 +35,27 @@ enum sgmii_speed {
|
||||||
#define phylink_pcs_to_lynx(pl_pcs) container_of((pl_pcs), struct lynx_pcs, pcs)
|
#define phylink_pcs_to_lynx(pl_pcs) container_of((pl_pcs), struct lynx_pcs, pcs)
|
||||||
#define lynx_to_phylink_pcs(lynx) (&(lynx)->pcs)
|
#define lynx_to_phylink_pcs(lynx) (&(lynx)->pcs)
|
||||||
|
|
||||||
|
static unsigned int lynx_pcs_inband_caps(struct phylink_pcs *pcs,
|
||||||
|
phy_interface_t interface)
|
||||||
|
{
|
||||||
|
switch (interface) {
|
||||||
|
case PHY_INTERFACE_MODE_1000BASEX:
|
||||||
|
case PHY_INTERFACE_MODE_SGMII:
|
||||||
|
case PHY_INTERFACE_MODE_QSGMII:
|
||||||
|
return LINK_INBAND_DISABLE | LINK_INBAND_ENABLE;
|
||||||
|
|
||||||
|
case PHY_INTERFACE_MODE_10GBASER:
|
||||||
|
case PHY_INTERFACE_MODE_2500BASEX:
|
||||||
|
return LINK_INBAND_DISABLE;
|
||||||
|
|
||||||
|
case PHY_INTERFACE_MODE_USXGMII:
|
||||||
|
return LINK_INBAND_ENABLE;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void lynx_pcs_get_state_usxgmii(struct mdio_device *pcs,
|
static void lynx_pcs_get_state_usxgmii(struct mdio_device *pcs,
|
||||||
struct phylink_link_state *state)
|
struct phylink_link_state *state)
|
||||||
{
|
{
|
||||||
|
|
@ -306,6 +327,7 @@ static void lynx_pcs_link_up(struct phylink_pcs *pcs, unsigned int neg_mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct phylink_pcs_ops lynx_pcs_phylink_ops = {
|
static const struct phylink_pcs_ops lynx_pcs_phylink_ops = {
|
||||||
|
.pcs_inband_caps = lynx_pcs_inband_caps,
|
||||||
.pcs_get_state = lynx_pcs_get_state,
|
.pcs_get_state = lynx_pcs_get_state,
|
||||||
.pcs_config = lynx_pcs_config,
|
.pcs_config = lynx_pcs_config,
|
||||||
.pcs_an_restart = lynx_pcs_an_restart,
|
.pcs_an_restart = lynx_pcs_an_restart,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user