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.
143 * if MAC link is at %MLO_AN_FIXED mode.
164 * @mac_get_caps: Get MAC capabilities for interface mode.
165 * @mac_select_pcs: Select a PCS for the interface mode.
167 * @mac_config: configure the MAC for the selected mode and state.
179 int (*mac_prepare)(struct phylink_config *config, unsigned int mode,
181 void (*mac_config)(struct phylink_config *config, unsigned int mode,
183 int (*mac_finish)(struct phylink_config *config, unsigned int mode,
185 void (*mac_link_down)(struct phylink_config *config, unsigned int mode,
188 struct phy_device *phy, unsigned int mode,
195 * mac_get_caps: Get MAC capabilities for interface mode.
197 * @interface: PHY interface mode.
201 * interface mode where there is some special handling required by the MAC
207 * mac_select_pcs: Select a PCS for the interface mode.
209 * @interface: PHY interface mode for PCS
211 * Return the &struct phylink_pcs for the specified interface mode, or
223 * mac_prepare() - prepare to change the PHY interface mode
225 * @mode: one of %MLO_AN_FIXED, %MLO_AN_PHY, %MLO_AN_INBAND.
226 * @iface: interface mode to switch to
229 * of the link, which includes changing the interface mode or at initial
230 * startup time. It may be called for the current mode. The MAC driver
244 int mac_prepare(struct phylink_config *config, unsigned int mode,
248 * mac_config() - configure the MAC for the selected mode and state
250 * @mode: one of %MLO_AN_FIXED, %MLO_AN_PHY, %MLO_AN_INBAND.
259 * e.g. interface mode. It will not be called for changes in speed, duplex
262 * In all negotiation modes, as defined by @mode, @state->pause indicates the
267 * to control the MAC pause mode settings.
269 * The action performed depends on the currently selected mode:
272 * Configure for non-inband negotiation mode, where the link settings
288 * place the link in an inband negotiation mode (such as 802.3z
289 * 1000base-X or Cisco SGMII mode depending on the @state->interface
290 * mode). In both cases, link state management (whether the link
295 * Interface mode specific details are mentioned below.
297 * If in 802.3z mode, the link speed is fixed, dependent on the
304 * If in Cisco SGMII mode, the link speed and duplex mode are passed
320 void mac_config(struct phylink_config *config, unsigned int mode,
324 * mac_finish() - finish a to change the PHY interface mode
326 * @mode: one of %MLO_AN_FIXED, %MLO_AN_PHY, %MLO_AN_INBAND.
327 * @iface: interface mode to switch to
331 * for the @mode and @iface. E.g. a MAC driver may wish to re-enable the
337 int mac_finish(struct phylink_config *config, unsigned int mode,
343 * @mode: link autonegotiation mode
344 * @interface: link &typedef phy_interface_t mode
346 * If @mode is not an in-band negotiation mode (as defined by
351 void mac_link_down(struct phylink_config *config, unsigned int mode,
358 * @mode: link autonegotiation mode
359 * @interface: link &typedef phy_interface_t mode
370 * or if in-band negotiation (as defined by phylink_autoneg_inband(@mode))
377 * If in-band negotiation mode is disabled, allow the link to come up. If
383 unsigned int mode, phy_interface_t interface,
393 * @neg_mode: provide PCS neg mode via "mode" argument
417 * @pcs_config: configure the MAC PCS for the selected mode and state.
449 * Validate the interface mode, and advertising's autoneg bit, removing any
454 * Returns -EINVAL if the interface mode/autoneg mode is not supported.
478 * current speed in @state->speed, duplex mode in @state->duplex, pause
479 * mode in @state->pause using the %MLO_PAUSE_RX and %MLO_PAUSE_TX bits,
491 * pcs_config() - Configure the PCS mode and advertisement
493 * @neg_mode: link negotiation mode (see below)
494 * @interface: interface mode to be used
495 * @advertising: adertisement ethtool link mode mask
498 * Configure the PCS for the operating mode, the interface mode, and set
500 * hardware may forward the pause mode resolution to the MAC.
532 * @neg_mode: link negotiation mode (see below)
533 * @interface: link &typedef phy_interface_t mode
539 * mode without in-band AN needs to be manually configured for the link
542 * The %mode argument should be tested via the phylink_mode_*() family of
595 #define __phylink_do_bit(op, bm, mode) \ argument
596 op(ETHTOOL_LINK_MODE_ ## mode ## _BIT, bm)
598 #define phylink_set(bm, mode) __phylink_do_bit(__set_bit, bm, mode) argument
599 #define phylink_clear(bm, mode) __phylink_do_bit(__clear_bit, bm, mode) argument
600 #define phylink_test(bm, mode) __phylink_do_bit(test_bit, bm, mode) argument
606 * @interface: link &typedef phy_interface_t mode
609 * mode, or -EINVAL if not appropriate.