Lines Matching refs: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)
98 return mode == MLO_AN_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.
146 * if MAC link is at %MLO_AN_FIXED mode.
168 * @mac_get_caps: Get MAC capabilities for interface mode.
169 * @mac_select_pcs: Select a PCS for the interface mode.
171 * @mac_config: configure the MAC for the selected mode and state.
183 int (*mac_prepare)(struct phylink_config *config, unsigned int mode,
185 void (*mac_config)(struct phylink_config *config, unsigned int mode,
187 int (*mac_finish)(struct phylink_config *config, unsigned int mode,
189 void (*mac_link_down)(struct phylink_config *config, unsigned int mode,
192 struct phy_device *phy, unsigned int mode,
199 * mac_get_caps: Get MAC capabilities for interface mode.
201 * @interface: PHY interface mode.
205 * interface mode where there is some special handling required by the MAC
211 * mac_select_pcs: Select a PCS for the interface mode.
213 * @interface: PHY interface mode for PCS
215 * Return the &struct phylink_pcs for the specified interface mode, or
227 * mac_prepare() - prepare to change the PHY interface mode
229 * @mode: one of %MLO_AN_FIXED, %MLO_AN_PHY, %MLO_AN_INBAND.
230 * @iface: interface mode to switch to
233 * of the link, which includes changing the interface mode or at initial
234 * startup time. It may be called for the current mode. The MAC driver
248 int mac_prepare(struct phylink_config *config, unsigned int mode,
252 * mac_config() - configure the MAC for the selected mode and state
254 * @mode: one of %MLO_AN_FIXED, %MLO_AN_PHY, %MLO_AN_INBAND.
263 * e.g. interface mode. It will not be called for changes in speed, duplex
266 * In all negotiation modes, as defined by @mode, @state->pause indicates the
271 * to control the MAC pause mode settings.
273 * The action performed depends on the currently selected mode:
276 * Configure for non-inband negotiation mode, where the link settings
292 * place the link in an inband negotiation mode (such as 802.3z
293 * 1000base-X or Cisco SGMII mode depending on the @state->interface
294 * mode). In both cases, link state management (whether the link
299 * Interface mode specific details are mentioned below.
301 * If in 802.3z mode, the link speed is fixed, dependent on the
308 * If in Cisco SGMII mode, the link speed and duplex mode are passed
324 void mac_config(struct phylink_config *config, unsigned int mode,
328 * mac_finish() - finish a to change the PHY interface mode
330 * @mode: one of %MLO_AN_FIXED, %MLO_AN_PHY, %MLO_AN_INBAND.
331 * @iface: interface mode to switch to
335 * for the @mode and @iface. E.g. a MAC driver may wish to re-enable the
341 int mac_finish(struct phylink_config *config, unsigned int mode,
347 * @mode: link autonegotiation mode
348 * @interface: link &typedef phy_interface_t mode
350 * If @mode is not an in-band negotiation mode (as defined by
355 void mac_link_down(struct phylink_config *config, unsigned int mode,
362 * @mode: link autonegotiation mode
363 * @interface: link &typedef phy_interface_t mode
374 * or if in-band negotiation (as defined by phylink_autoneg_inband(@mode))
381 * If in-band negotiation mode is disabled, allow the link to come up. If
387 unsigned int mode, phy_interface_t interface,
397 * @neg_mode: provide PCS neg mode via "mode" argument
426 * @pcs_config: configure the MAC PCS for the selected mode and state.
461 * Validate the interface mode, and advertising's autoneg bit, removing any
466 * Returns -EINVAL if the interface mode/autoneg mode is not supported.
490 * current speed in @state->speed, duplex mode in @state->duplex, pause
491 * mode in @state->pause using the %MLO_PAUSE_RX and %MLO_PAUSE_TX bits,
500 * pcs_config() - Configure the PCS mode and advertisement
502 * @neg_mode: link negotiation mode (see below)
503 * @interface: interface mode to be used
504 * @advertising: adertisement ethtool link mode mask
507 * Configure the PCS for the operating mode, the interface mode, and set
509 * hardware may forward the pause mode resolution to the MAC.
541 * @neg_mode: link negotiation mode (see below)
542 * @interface: link &typedef phy_interface_t mode
548 * mode without in-band AN needs to be manually configured for the link
551 * The %mode argument should be tested via the phylink_mode_*() family of
634 #define __phylink_do_bit(op, bm, mode) \
635 op(ETHTOOL_LINK_MODE_ ## mode ## _BIT, bm)
637 #define phylink_set(bm, mode) __phylink_do_bit(__set_bit, bm, mode)
638 #define phylink_clear(bm, mode) __phylink_do_bit(__clear_bit, bm, mode)
639 #define phylink_test(bm, mode) __phylink_do_bit(test_bit, bm, mode)
645 * @interface: link &typedef phy_interface_t mode
648 * mode, or -EINVAL if not appropriate.