Lines Matching full:mode
24 MLO_AN_FIXED, /* Fixed-link mode */
27 /* PCS "negotiation" mode.
30 * PHYLINK_PCS_NEG_INBAND_DISABLED - inband mode disabled, e.g.
32 * PHYLINK_PCS_NEG_INBAND_ENABLED - inband mode enabled
34 * PHYLINK_PCS_NEG_INBAND - inband mode selected
35 * PHYLINK_PCS_NEG_ENABLED - negotiation mode enabled
98 static inline bool phylink_autoneg_inband(unsigned int mode) in phylink_autoneg_inband() argument
100 return mode == MLO_AN_INBAND; in phylink_autoneg_inband()
108 * @interface: link &typedef phy_interface_t mode
110 * @duplex: link duplex mode, one of DUPLEX_* constants.
114 * the medium link mode (@speed and @duplex) and the speed/duplex of the phy
115 * interface mode (@interface) are different.
141 * if MAC link is at %MLO_AN_FIXED mode.
150 * if MAC link is at %MLO_AN_FIXED mode.
182 * @mac_get_caps: Get MAC capabilities for interface mode.
183 * @mac_select_pcs: Select a PCS for the interface mode.
185 * @mac_config: configure the MAC for the selected mode and state.
199 int (*mac_prepare)(struct phylink_config *config, unsigned int mode,
201 void (*mac_config)(struct phylink_config *config, unsigned int mode,
203 int (*mac_finish)(struct phylink_config *config, unsigned int mode,
205 void (*mac_link_down)(struct phylink_config *config, unsigned int mode,
208 struct phy_device *phy, unsigned int mode,
218 * mac_get_caps: Get MAC capabilities for interface mode.
220 * @interface: PHY interface mode.
224 * interface mode where there is some special handling required by the MAC
230 * mac_select_pcs: Select a PCS for the interface mode.
232 * @interface: PHY interface mode for PCS
234 * Return the &struct phylink_pcs for the specified interface mode, or
246 * mac_prepare() - prepare to change the PHY interface mode
248 * @mode: one of %MLO_AN_FIXED, %MLO_AN_PHY, %MLO_AN_INBAND.
249 * @iface: interface mode to switch to
252 * of the link, which includes changing the interface mode or at initial
253 * startup time. It may be called for the current mode. The MAC driver
267 int mac_prepare(struct phylink_config *config, unsigned int mode,
271 * mac_config() - configure the MAC for the selected mode and state
273 * @mode: one of %MLO_AN_FIXED, %MLO_AN_PHY, %MLO_AN_INBAND.
282 * e.g. interface mode. It will not be called for changes in speed, duplex
285 * In all negotiation modes, as defined by @mode, @state->pause indicates the
290 * to control the MAC pause mode settings.
292 * The action performed depends on the currently selected mode:
295 * Configure for non-inband negotiation mode, where the link settings
311 * place the link in an inband negotiation mode (such as 802.3z
312 * 1000base-X or Cisco SGMII mode depending on the @state->interface
313 * mode). In both cases, link state management (whether the link
318 * Interface mode specific details are mentioned below.
320 * If in 802.3z mode, the link speed is fixed, dependent on the
327 * If in Cisco SGMII mode, the link speed and duplex mode are passed
343 void mac_config(struct phylink_config *config, unsigned int mode,
347 * mac_finish() - finish a to change the PHY interface mode
349 * @mode: one of %MLO_AN_FIXED, %MLO_AN_PHY, %MLO_AN_INBAND.
350 * @iface: interface mode to switch to
354 * for the @mode and @iface. E.g. a MAC driver may wish to re-enable the
360 int mac_finish(struct phylink_config *config, unsigned int mode,
366 * @mode: link autonegotiation mode
367 * @interface: link &typedef phy_interface_t mode
369 * If @mode is not an in-band negotiation mode (as defined by
374 void mac_link_down(struct phylink_config *config, unsigned int mode,
381 * @mode: link autonegotiation mode
382 * @interface: link &typedef phy_interface_t mode
393 * or if in-band negotiation (as defined by phylink_autoneg_inband(@mode))
400 * If in-band negotiation mode is disabled, allow the link to come up. If
406 unsigned int mode, phy_interface_t interface,
445 * @neg_mode: provide PCS neg mode via "mode" argument
470 * @pcs_inband_caps: query inband support for interface mode.
476 * @pcs_config: configure the MAC PCS for the selected mode and state.
513 * Validate the interface mode, and advertising's autoneg bit, removing any
518 * Returns -EINVAL if the interface mode/autoneg mode is not supported.
525 * pcs_inband_caps - query PCS in-band capabilities for interface mode.
527 * @interface: interface mode to be queried
533 * for this interface mode.
553 * @neg_mode: link negotiation mode (PHYLINK_PCS_NEG_xxx)
557 * current speed in @state->speed, duplex mode in @state->duplex, pause
558 * mode in @state->pause using the %MLO_PAUSE_RX and %MLO_PAUSE_TX bits,
570 * pcs_config() - Configure the PCS mode and advertisement
572 * @neg_mode: link negotiation mode (see below)
573 * @interface: interface mode to be used
574 * @advertising: adertisement ethtool link mode mask
577 * Configure the PCS for the operating mode, the interface mode, and set
579 * hardware may forward the pause mode resolution to the MAC.
611 * @neg_mode: link negotiation mode (see below)
612 * @interface: link &typedef phy_interface_t mode
618 * mode without in-band AN needs to be manually configured for the link
621 * The %mode argument should be tested via the phylink_mode_*() family of
706 #define __phylink_do_bit(op, bm, mode) \ argument
707 op(ETHTOOL_LINK_MODE_ ## mode ## _BIT, bm)
709 #define phylink_set(bm, mode) __phylink_do_bit(__set_bit, bm, mode) argument
710 #define phylink_clear(bm, mode) __phylink_do_bit(__clear_bit, bm, mode) argument
711 #define phylink_test(bm, mode) __phylink_do_bit(test_bit, bm, mode) argument
717 * @interface: link &typedef phy_interface_t mode
720 * mode, or -EINVAL if not appropriate.