Lines Matching +full:fixed +full:- +full:link
1 .. SPDX-License-Identifier: GPL-2.0
10 phylink is a mechanism to support hot-pluggable networking modules
11 directly connected to a MAC without needing to re-initialise the
12 adapter on hot-plug events.
14 phylink supports conventional phylib-based setups, fixed link setups
25 In PHY mode, we use phylib to read the current link settings from
28 negotiation being enabled on the link.
30 2. Fixed mode
32 Fixed mode is the same as PHY mode as far as the MAC driver is
35 3. In-band mode
37 In-band mode is used with 802.3z, SGMII and similar interface modes,
38 and we are expecting to use and honor the in-band negotiation or
43 .. code-block:: none
47 phy-mode = "sgmii";
50 does not use in-band SGMII signalling. The PHY is expected to follow
52 The link should be forced up or down appropriately in the
55 .. code-block:: none
58 managed = "in-band-status";
60 phy-mode = "sgmii";
63 uses in-band mode, where results from the PHY's negotiation are passed
66 :c:func:`mac_link_down` functions must not force the MAC side link
77 three parts dealing with link-down, link-up and reconfiguring the
110 .. flat-table::
111 :header-rows: 1
113 :stub-columns: 0
115 * - Original function
116 - Replacement function
117 * - phy_start(phydev)
118 - phylink_start(priv->phylink)
119 * - phy_stop(phydev)
120 - phylink_stop(priv->phylink)
121 * - phy_mii_ioctl(phydev, ifr, cmd)
122 - phylink_mii_ioctl(priv->phylink, ifr, cmd)
123 * - phy_ethtool_get_wol(phydev, wol)
124 - phylink_ethtool_get_wol(priv->phylink, wol)
125 * - phy_ethtool_set_wol(phydev, wol)
126 - phylink_ethtool_set_wol(priv->phylink, wol)
127 * - phy_disconnect(phydev)
128 - phylink_disconnect_phy(priv->phylink)
136 .. code-block:: c
143 return phylink_ethtool_ksettings_set(priv->phylink, cmd);
151 return phylink_ethtool_ksettings_get(priv->phylink, cmd);
160 err = phylink_of_phy_connect(priv->phylink, node, flags);
167 fixed link properties, and will also contain the sfp property.
169 The setup of fixed links should also be removed; these are handled
172 of_phy_connect() was also passed a function pointer for link updates.
189 these functions. The old link update function for
194 It is important that if in-band negotiation is used,
196 in-band negotiation from completing, since these functions are called
197 when the in-band link state changes - otherwise the link will never
201 and ``state->advertising`` with the supported ethtool link modes.
202 These are the new ethtool link modes, so bitmask operations must be
205 The :c:func:`mac_link_state` method is used to read the link state
207 using. This is particularly important for in-band negotiation
208 methods such as 1000base-X and SGMII.
211 requested state, and must avoid unnecessarily taking the link down
213 function should modify the state and only take the link down when
222 of_phy_register_fixed_link() for fixed links etc. from the probe
225 .. code-block:: c
228 priv->phylink_config.dev = &dev.dev;
229 priv->phylink_config.type = PHYLINK_NETDEV;
231 phylink = phylink_create(&priv->phylink_config, node, phy_mode, &phylink_ops);
237 priv->phylink = phylink;
242 .. code-block:: c
244 phylink_destroy(priv->phylink);
246 10. Arrange for MAC link state interrupts to be forwarded into
249 .. code-block:: c
251 phylink_mac_change(priv->phylink, link_is_up);
253 where ``link_is_up`` is true if the link is currently up or false
261 as these will interfere with phylink's tracking of the link state,