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()
106 * @interface: link &typedef phy_interface_t mode
108 * @duplex: link duplex mode, one of DUPLEX_* constants.
112 * the medium link mode (@speed and @duplex) and the speed/duplex of the phy
113 * interface mode (@interface) are different.
139 * if MAC link is at %MLO_AN_FIXED mode.
147 * if MAC link is at %MLO_AN_FIXED mode.
169 * @mac_get_caps: Get MAC capabilities for interface mode.
170 * @mac_select_pcs: Select a PCS for the interface mode.
172 * @mac_config: configure the MAC for the selected mode and state.
184 int (*mac_prepare)(struct phylink_config *config, unsigned int mode,
186 void (*mac_config)(struct phylink_config *config, unsigned int mode,
188 int (*mac_finish)(struct phylink_config *config, unsigned int mode,
190 void (*mac_link_down)(struct phylink_config *config, unsigned int mode,
193 struct phy_device *phy, unsigned int mode,
200 * mac_get_caps: Get MAC capabilities for interface mode.
202 * @interface: PHY interface mode.
206 * interface mode where there is some special handling required by the MAC
212 * mac_select_pcs: Select a PCS for the interface mode.
214 * @interface: PHY interface mode for PCS
216 * Return the &struct phylink_pcs for the specified interface mode, or
228 * mac_prepare() - prepare to change the PHY interface mode
230 * @mode: one of %MLO_AN_FIXED, %MLO_AN_PHY, %MLO_AN_INBAND.
231 * @iface: interface mode to switch to
234 * of the link, which includes changing the interface mode or at initial
235 * startup time. It may be called for the current mode. The MAC driver
249 int mac_prepare(struct phylink_config *config, unsigned int mode,
253 * mac_config() - configure the MAC for the selected mode and state
255 * @mode: one of %MLO_AN_FIXED, %MLO_AN_PHY, %MLO_AN_INBAND.
264 * e.g. interface mode. It will not be called for changes in speed, duplex
267 * In all negotiation modes, as defined by @mode, @state->pause indicates the
272 * to control the MAC pause mode settings.
274 * The action performed depends on the currently selected mode:
277 * Configure for non-inband negotiation mode, where the link settings
293 * place the link in an inband negotiation mode (such as 802.3z
294 * 1000base-X or Cisco SGMII mode depending on the @state->interface
295 * mode). In both cases, link state management (whether the link
300 * Interface mode specific details are mentioned below.
302 * If in 802.3z mode, the link speed is fixed, dependent on the
309 * If in Cisco SGMII mode, the link speed and duplex mode are passed
325 void mac_config(struct phylink_config *config, unsigned int mode,
329 * mac_finish() - finish a to change the PHY interface mode
331 * @mode: one of %MLO_AN_FIXED, %MLO_AN_PHY, %MLO_AN_INBAND.
332 * @iface: interface mode to switch to
336 * for the @mode and @iface. E.g. a MAC driver may wish to re-enable the
342 int mac_finish(struct phylink_config *config, unsigned int mode,
348 * @mode: link autonegotiation mode
349 * @interface: link &typedef phy_interface_t mode
351 * If @mode is not an in-band negotiation mode (as defined by
356 void mac_link_down(struct phylink_config *config, unsigned int mode,
363 * @mode: link autonegotiation mode
364 * @interface: link &typedef phy_interface_t mode
375 * or if in-band negotiation (as defined by phylink_autoneg_inband(@mode))
382 * If in-band negotiation mode is disabled, allow the link to come up. If
388 unsigned int mode, phy_interface_t interface,
398 * @neg_mode: provide PCS neg mode via "mode" argument
427 * @pcs_config: configure the MAC PCS for the selected mode and state.
462 * Validate the interface mode, and advertising's autoneg bit, removing any
467 * Returns -EINVAL if the interface mode/autoneg mode is not supported.
491 * current speed in @state->speed, duplex mode in @state->duplex, pause
492 * mode in @state->pause using the %MLO_PAUSE_RX and %MLO_PAUSE_TX bits,
501 * pcs_config() - Configure the PCS mode and advertisement
503 * @neg_mode: link negotiation mode (see below)
504 * @interface: interface mode to be used
505 * @advertising: adertisement ethtool link mode mask
508 * Configure the PCS for the operating mode, the interface mode, and set
510 * hardware may forward the pause mode resolution to the MAC.
542 * @neg_mode: link negotiation mode (see below)
543 * @interface: link &typedef phy_interface_t mode
549 * mode without in-band AN needs to be manually configured for the link
552 * The %mode argument should be tested via the phylink_mode_*() family of
637 #define __phylink_do_bit(op, bm, mode) \ argument
638 op(ETHTOOL_LINK_MODE_ ## mode ## _BIT, bm)
640 #define phylink_set(bm, mode) __phylink_do_bit(__set_bit, bm, mode) argument
641 #define phylink_clear(bm, mode) __phylink_do_bit(__clear_bit, bm, mode) argument
642 #define phylink_test(bm, mode) __phylink_do_bit(test_bit, bm, mode) argument
648 * @interface: link &typedef phy_interface_t mode
651 * mode, or -EINVAL if not appropriate.