Lines Matching full:mode

22 	MLO_AN_FIXED,	/* Fixed-link mode */
25 /* PCS "negotiation" mode.
28 * PHYLINK_PCS_NEG_INBAND_DISABLED - inband mode disabled, e.g.
30 * PHYLINK_PCS_NEG_INBAND_ENABLED - inband mode enabled
32 * PHYLINK_PCS_NEG_INBAND - inband mode selected
33 * PHYLINK_PCS_NEG_ENABLED - negotiation mode enabled
96 static inline bool phylink_autoneg_inband(unsigned int mode) in phylink_autoneg_inband() argument
98 return mode == MLO_AN_INBAND; in phylink_autoneg_inband()
102 * phylink_pcs_neg_mode() - helper to determine PCS inband mode
103 * @mode: one of %MLO_AN_FIXED, %MLO_AN_PHY, %MLO_AN_INBAND.
104 * @interface: interface mode to be used
105 * @advertising: adertisement ethtool link mode mask
107 * Determines the negotiation mode to be used by the PCS, and returns
110 * - %PHYLINK_PCS_NEG_NONE: interface mode does not support inband
111 * - %PHYLINK_PCS_NEG_OUTBAND: an out of band mode (e.g. reading the PHY)
113 * - %PHYLINK_PCS_NEG_INBAND_DISABLED: inband mode selected but autoneg
115 * - %PHYLINK_PCS_NEG_INBAND_ENABLED: inband mode selected and autoneg enabled
120 static inline unsigned int phylink_pcs_neg_mode(unsigned int mode, in phylink_pcs_neg_mode() argument
136 if (!phylink_autoneg_inband(mode)) in phylink_pcs_neg_mode()
150 if (!phylink_autoneg_inband(mode)) in phylink_pcs_neg_mode()
172 * @interface: link &typedef phy_interface_t mode
174 * @duplex: link duplex mode, one of DUPLEX_* constants.
178 * the medium link mode (@speed and @duplex) and the speed/duplex of the phy
179 * interface mode (@interface) are different.
205 * if MAC link is at %MLO_AN_FIXED mode.
209 * if MAC link is at %MLO_AN_FIXED mode.
231 * @mac_select_pcs: Select a PCS for the interface mode.
233 * @mac_config: configure the MAC for the selected mode and state.
246 int (*mac_prepare)(struct phylink_config *config, unsigned int mode,
248 void (*mac_config)(struct phylink_config *config, unsigned int mode,
250 int (*mac_finish)(struct phylink_config *config, unsigned int mode,
252 void (*mac_link_down)(struct phylink_config *config, unsigned int mode,
255 struct phy_device *phy, unsigned int mode,
272 * because the MAC is unable to BaseX mode. This is more about
285 * If the @state->interface mode is not supported, then the @supported
296 * mac_select_pcs: Select a PCS for the interface mode.
298 * @interface: PHY interface mode for PCS
300 * Return the &struct phylink_pcs for the specified interface mode, or
312 * mac_prepare() - prepare to change the PHY interface mode
314 * @mode: one of %MLO_AN_FIXED, %MLO_AN_PHY, %MLO_AN_INBAND.
315 * @iface: interface mode to switch to
318 * of the link, which includes changing the interface mode or at initial
319 * startup time. It may be called for the current mode. The MAC driver
333 int mac_prepare(struct phylink_config *config, unsigned int mode,
337 * mac_config() - configure the MAC for the selected mode and state
339 * @mode: one of %MLO_AN_FIXED, %MLO_AN_PHY, %MLO_AN_INBAND.
348 * e.g. interface mode. It will not be called for changes in speed, duplex
351 * In all negotiation modes, as defined by @mode, @state->pause indicates the
356 * to control the MAC pause mode settings.
358 * The action performed depends on the currently selected mode:
361 * Configure for non-inband negotiation mode, where the link settings
377 * place the link in an inband negotiation mode (such as 802.3z
378 * 1000base-X or Cisco SGMII mode depending on the @state->interface
379 * mode). In both cases, link state management (whether the link
384 * Interface mode specific details are mentioned below.
386 * If in 802.3z mode, the link speed is fixed, dependent on the
393 * If in Cisco SGMII mode, the link speed and duplex mode are passed
409 void mac_config(struct phylink_config *config, unsigned int mode,
413 * mac_finish() - finish a to change the PHY interface mode
415 * @mode: one of %MLO_AN_FIXED, %MLO_AN_PHY, %MLO_AN_INBAND.
416 * @iface: interface mode to switch to
420 * for the @mode and @iface. E.g. a MAC driver may wish to re-enable the
426 int mac_finish(struct phylink_config *config, unsigned int mode,
432 * @mode: link autonegotiation mode
433 * @interface: link &typedef phy_interface_t mode
435 * If @mode is not an in-band negotiation mode (as defined by
440 void mac_link_down(struct phylink_config *config, unsigned int mode,
447 * @mode: link autonegotiation mode
448 * @interface: link &typedef phy_interface_t mode
459 * or if in-band negotiation (as defined by phylink_autoneg_inband(@mode))
466 * If in-band negotiation mode is disabled, allow the link to come up. If
472 unsigned int mode, phy_interface_t interface,
482 * @neg_mode: provide PCS neg mode via "mode" argument
506 * @pcs_config: configure the MAC PCS for the selected mode and state.
538 * Validate the interface mode, and advertising's autoneg bit, removing any
543 * Returns -EINVAL if the interface mode/autoneg mode is not supported.
567 * current speed in @state->speed, duplex mode in @state->duplex, pause
568 * mode in @state->pause using the %MLO_PAUSE_RX and %MLO_PAUSE_TX bits,
580 * pcs_config() - Configure the PCS mode and advertisement
582 * @neg_mode: link negotiation mode (see below)
583 * @interface: interface mode to be used
584 * @advertising: adertisement ethtool link mode mask
587 * Configure the PCS for the operating mode, the interface mode, and set
589 * hardware may forward the pause mode resolution to the MAC.
621 * @neg_mode: link negotiation mode (see below)
622 * @interface: link &typedef phy_interface_t mode
628 * mode without in-band AN needs to be manually configured for the link
631 * The %mode argument should be tested via the phylink_mode_*() family of
695 #define __phylink_do_bit(op, bm, mode) \ argument
696 op(ETHTOOL_LINK_MODE_ ## mode ## _BIT, bm)
698 #define phylink_set(bm, mode) __phylink_do_bit(__set_bit, bm, mode) argument
699 #define phylink_clear(bm, mode) __phylink_do_bit(__clear_bit, bm, mode) argument
700 #define phylink_test(bm, mode) __phylink_do_bit(test_bit, bm, mode) argument
706 * @interface: link &typedef phy_interface_t mode
709 * mode, or -EINVAL if not appropriate.