Lines Matching +full:pcs +full:- +full:phy

1 // SPDX-License-Identifier: GPL-2.0+
7 #include <linux/phy/phy.h>
14 struct lan966x_port *port = netdev_priv(to_net_dev(config->dev)); in lan966x_phylink_mac_select()
16 return &port->phylink_pcs; in lan966x_phylink_mac_select()
29 struct lan966x_port *port = netdev_priv(to_net_dev(config->dev)); in lan966x_phylink_mac_prepare()
33 if (port->serdes) { in lan966x_phylink_mac_prepare()
34 err = phy_set_mode_ext(port->serdes, PHY_MODE_ETHERNET, in lan966x_phylink_mac_prepare()
37 netdev_err(to_net_dev(config->dev), in lan966x_phylink_mac_prepare()
47 struct phy_device *phy, in lan966x_phylink_mac_link_up() argument
53 struct lan966x_port *port = netdev_priv(to_net_dev(config->dev)); in lan966x_phylink_mac_link_up()
54 struct lan966x_port_config *port_config = &port->config; in lan966x_phylink_mac_link_up()
56 port_config->duplex = duplex; in lan966x_phylink_mac_link_up()
57 port_config->speed = speed; in lan966x_phylink_mac_link_up()
58 port_config->pause = 0; in lan966x_phylink_mac_link_up()
59 port_config->pause |= tx_pause ? MLO_PAUSE_TX : 0; in lan966x_phylink_mac_link_up()
60 port_config->pause |= rx_pause ? MLO_PAUSE_RX : 0; in lan966x_phylink_mac_link_up()
63 phy_set_speed(port->serdes, speed); in lan966x_phylink_mac_link_up()
72 struct lan966x_port *port = netdev_priv(to_net_dev(config->dev)); in lan966x_phylink_mac_link_down()
73 struct lan966x *lan966x = port->lan966x; in lan966x_phylink_mac_link_down()
77 /* Take PCS out of reset */ in lan966x_phylink_mac_link_down()
82 lan966x, DEV_CLOCK_CFG(port->chip_port)); in lan966x_phylink_mac_link_down()
85 static struct lan966x_port *lan966x_pcs_to_port(struct phylink_pcs *pcs) in lan966x_pcs_to_port() argument
87 return container_of(pcs, struct lan966x_port, phylink_pcs); in lan966x_pcs_to_port()
90 static void lan966x_pcs_get_state(struct phylink_pcs *pcs, in lan966x_pcs_get_state() argument
93 struct lan966x_port *port = lan966x_pcs_to_port(pcs); in lan966x_pcs_get_state()
98 static int lan966x_pcs_config(struct phylink_pcs *pcs, unsigned int neg_mode, in lan966x_pcs_config() argument
103 struct lan966x_port *port = lan966x_pcs_to_port(pcs); in lan966x_pcs_config()
107 config = port->config; in lan966x_pcs_config()
115 netdev_err(port->dev, "port PCS config failed: %d\n", ret); in lan966x_pcs_config()
120 static void lan966x_pcs_aneg_restart(struct phylink_pcs *pcs) in lan966x_pcs_aneg_restart() argument