Lines Matching +full:g +full:- +full:link

24 	MLO_AN_FIXED,	/* Fixed-link mode */
25 MLO_AN_INBAND, /* In-band protocol */
28 * PHYLINK_PCS_NEG_NONE - protocol has no inband capability
29 * PHYLINK_PCS_NEG_OUTBAND - some out of band or fixed link setting
30 * PHYLINK_PCS_NEG_INBAND_DISABLED - inband mode disabled, e.g.
31 * 1000base-X with autoneg off
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
104 * struct phylink_link_state - link state structure
105 * @advertising: ethtool bitmask containing advertised link modes
106 * @lp_advertising: ethtool bitmask containing link partner advertised link
108 * @interface: link &typedef phy_interface_t mode
109 * @speed: link speed, one of the SPEED_* constants.
110 * @duplex: link duplex mode, one of DUPLEX_* constants.
111 * @pause: link pause state, described by MLO_PAUSE_* constants.
114 * the medium link mode (@speed and @duplex) and the speed/duplex of the phy
116 * @link: true if the link is up.
127 unsigned int link:1; member
137 * struct phylink_config - PHYLINK configuration structure
141 * if MAC link is at %MLO_AN_FIXED mode.
147 * MLO_AN_PHY. A fixed-link specification will override.
149 * @get_fixed_state: callback to execute to determine the fixed link state,
150 * if MAC link is at %MLO_AN_FIXED mode.
181 * struct phylink_mac_ops - MAC operations structure.
187 * @mac_link_down: take the link down.
188 * @mac_link_up: allow the link to come up.
216 #if 0 /* For kernel-doc purposes only. */
222 * Optional method. When not provided, config->mac_capabilities will be used.
225 * driver (e.g. not supporting half-duplex in certain interface modes.)
246 * mac_prepare() - prepare to change the PHY interface mode
252 * of the link, which includes changing the interface mode or at initial
254 * should perform whatever actions are required, e.g. disabling the
258 * - mac_prepare()
259 * - mac_config()
260 * - pcs_config()
261 * - possible pcs_an_restart()
262 * - mac_finish()
271 * mac_config() - configure the MAC for the selected mode and state
276 * Note - not all members of @state are valid. In particular,
277 * @state->lp_advertising, @state->link, @state->an_complete are never
282 * e.g. interface mode. It will not be called for changes in speed, duplex
283 * or pause modes or to change the in-band advertisement.
285 * In all negotiation modes, as defined by @mode, @state->pause indicates the
289 * the results of in-band negotiation/status from the MAC PCS should be used
295 * Configure for non-inband negotiation mode, where the link settings
296 * are completely communicated via mac_link_up(). The physical link
297 * protocol from the MAC is specified by @state->interface.
299 * @state->advertising may be used, but is not required.
301 * Older drivers (prior to the mac_link_up() change) may use @state->speed,
302 * @state->duplex and @state->pause to configure the MAC, but this is
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
315 * pcs_get_state() callback. Changes in link state must be made
320 * If in 802.3z mode, the link speed is fixed, dependent on the
321 * @state->interface. Duplex and pause modes are negotiated via
322 * the in-band configuration word. Advertised pause modes are set
323 * according to the @state->an_enabled and @state->advertising
327 * If in Cisco SGMII mode, the link speed and duplex mode are passed
328 * in the serial bitstream 16-bit configuration word, and the MAC
337 * requested settings - i.o.w., if nothing has changed between two
339 * changed, flow control should be updated *without* taking the link
341 * link up status.
347 * mac_finish() - finish a to change the PHY interface mode
354 * for the @mode and @iface. E.g. a MAC driver may wish to re-enable the
364 * mac_link_down() - notification that the link has gone down
366 * @mode: link autonegotiation mode
367 * @interface: link &typedef phy_interface_t mode
369 * Notifies the MAC that the link has gone down. This will not be called
374 * stack that the link has gone down, so MAC drivers should not make this
378 * link coming up.
384 * mac_link_up() - notification that the link has come up
386 * @phy: any attached phy (deprecated - please use LPI interfaces)
387 * @mode: link autonegotiation mode
388 * @interface: link &typedef phy_interface_t mode
389 * @speed: link speed
390 * @duplex: link duplex
391 * @tx_pause: link transmit pause enablement status
392 * @rx_pause: link receive pause enablement status
394 * Notifies the MAC that the link has come up, and the parameters of the
395 * link as seen from the MACs point of view. If mac_link_up() has been
399 * @speed, @duplex, @tx_pause and @rx_pause indicate the finalised link
402 * or if in-band negotiation (as defined by phylink_autoneg_inband(@mode))
405 * Note that when 802.3z in-band negotiation is in use, it is possible
419 * mac_disable_tx_lpi() - disable LPI generation at the MAC
428 * mac_enable_tx_lpi() - configure and enable LPI generation at the MAC
434 * the link is already up, to cater for situations where the hardware
435 * needs to be programmed according to the link speed.
449 * struct phylink_pcs - PHYLINK PCS instance
454 * @poll: poll the PCS for link changes
475 * struct phylink_pcs_ops - MAC PCS operations structure.
476 * @pcs_validate: validate the link configuration.
480 * @pcs_pre_config: pre-mac_config method (for errata)
481 * @pcs_post_config: post-mac_config method (for arrata)
482 * @pcs_get_state: read the current MAC PCS link state from the hardware.
485 * @pcs_link_up: program the PCS for the resolved link configuration
492 * initialization e.g. RX clock for stmmac.
519 #if 0 /* For kernel-doc purposes only. */
521 * pcs_validate() - validate the link configuration.
523 * @supported: ethtool bitmask for supported link modes.
527 * media ethtool link modes that would not be supportable from the supported
531 * Returns -EINVAL if the interface mode/autoneg mode is not supported.
532 * Returns non-zero positive if the link state can be supported.
538 * pcs_inband_caps - query PCS in-band capabilities for interface mode.
542 * Returns zero if it is unknown what in-band signalling is supported by the
543 * PHY (e.g. because the PHY driver doesn't implement the method.) Otherwise,
552 * pcs_enable() - enable the PCS.
558 * pcs_disable() - disable the PCS.
564 * pcs_get_state() - Read the current inband link state from the hardware
566 * @neg_mode: link negotiation mode (PHYLINK_PCS_NEG_xxx)
569 * Read the current inband link state from the MAC PCS, reporting the
570 * current speed in @state->speed, duplex mode in @state->duplex, pause
571 * mode in @state->pause using the %MLO_PAUSE_RX and %MLO_PAUSE_TX bits,
572 * negotiation completion state in @state->an_complete, and link up state
573 * in @state->link. If possible, @state->lp_advertising should also be
583 * pcs_config() - Configure the PCS mode and advertisement
585 * @neg_mode: link negotiation mode (see below)
587 * @advertising: adertisement ethtool link mode mask
600 * For 1000BASE-X, the advertisement should be programmed into the PCS.
602 * For most 10GBASE-R, there is no advertisement.
605 * functions, or for PCS that set pcs->neg_mode true, should be tested
610 * disrupt an established link.
613 * should return a positive non-zero integer (e.g. 1) to indicate to phylink
621 * pcs_an_restart() - restart 802.3z BaseX autonegotiation
630 * pcs_link_up() - program the PCS for the resolved link configuration
632 * @neg_mode: link negotiation mode (see below)
633 * @interface: link &typedef phy_interface_t mode
634 * @speed: link speed
635 * @duplex: link duplex
638 * the resolved link parameters. For example, a PCS operating in SGMII
639 * mode without in-band AN needs to be manually configured for the link
640 * and duplex setting. Otherwise, this should be a no-op.
643 * functions, or for PCS that set pcs->neg_mode true, should be tested
650 * pcs_disable_eee() - Disable EEE at the PCS
658 * pcs_enable_eee() - Enable EEE at the PCS
666 * pcs_pre_init() - Configure PCS components necessary for MAC initialization
671 * should not be called after the link is brought up, as reconfiguring the PCS
672 * at this point could break the link.
687 * pre-initialization.
738 int phylink_ethtool_get_eee(struct phylink *link, struct ethtool_keee *eee);
739 int phylink_ethtool_set_eee(struct phylink *link, struct ethtool_keee *eee);
756 * phylink_get_link_timer_ns - return the PCS link timer value
757 * @interface: link &typedef phy_interface_t mode
759 * Return the PCS link timer setting in nanoseconds for the PHY @interface
760 * mode, or -EINVAL if not appropriate.
776 return -EINVAL; in phylink_get_link_timer_ns()
781 * phylink_mac_implements_lpi() - determine if MAC implements LPI ops
789 return ops && ops->mac_disable_tx_lpi && ops->mac_enable_tx_lpi; in phylink_mac_implements_lpi()