Lines Matching +full:eee +full:- +full:pcs
22 MLO_AN_FIXED, /* Fixed-link mode */
23 MLO_AN_INBAND, /* In-band protocol */
25 /* PCS "negotiation" mode.
26 * PHYLINK_PCS_NEG_NONE - protocol has no inband capability
27 * PHYLINK_PCS_NEG_OUTBAND - some out of band or fixed link setting
28 * PHYLINK_PCS_NEG_INBAND_DISABLED - inband mode disabled, e.g.
29 * 1000base-X with autoneg off
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
102 * struct phylink_link_state - link state structure
135 * struct phylink_config - PHYLINK configuration structure
145 * MLO_AN_PHY. A fixed-link specification will override.
149 * are supported by the MAC/PCS.
168 * struct phylink_mac_ops - MAC operations structure.
170 * @mac_select_pcs: Select a PCS for the interface mode.
198 #if 0 /* For kernel-doc purposes only. */
204 * Optional method. When not provided, config->mac_capabilities will be used.
207 * driver (e.g. not supporting half-duplex in certain interface modes.)
212 * mac_select_pcs: Select a PCS for the interface mode.
214 * @interface: PHY interface mode for PCS
219 * This must not modify any state. It is used to query which PCS should
222 * set the PCS that will be used.
228 * mac_prepare() - prepare to change the PHY interface mode
240 * - mac_prepare()
241 * - mac_config()
242 * - pcs_config()
243 * - possible pcs_an_restart()
244 * - mac_finish()
253 * mac_config() - configure the MAC for the selected mode and state
258 * Note - not all members of @state are valid. In particular,
259 * @state->lp_advertising, @state->link, @state->an_complete are never
265 * or pause modes or to change the in-band advertisement.
267 * In all negotiation modes, as defined by @mode, @state->pause indicates the
271 * the results of in-band negotiation/status from the MAC PCS should be used
277 * Configure for non-inband negotiation mode, where the link settings
279 * protocol from the MAC is specified by @state->interface.
281 * @state->advertising may be used, but is not required.
283 * Older drivers (prior to the mac_link_up() change) may use @state->speed,
284 * @state->duplex and @state->pause to configure the MAC, but this is
294 * 1000base-X or Cisco SGMII mode depending on the @state->interface
303 * @state->interface. Duplex and pause modes are negotiated via
304 * the in-band configuration word. Advertised pause modes are set
305 * according to the @state->an_enabled and @state->advertising
310 * in the serial bitstream 16-bit configuration word, and the MAC
319 * requested settings - i.o.w., if nothing has changed between two
329 * mac_finish() - finish a to change the PHY interface mode
335 * complete any necessary steps after the MAC and PCS have been configured
336 * for the @mode and @iface. E.g. a MAC driver may wish to re-enable the
346 * mac_link_down() - take the link down
351 * If @mode is not an in-band negotiation mode (as defined by
360 * mac_link_up() - allow the link to come up
374 * where these settings are not automatically conveyed from the PCS block,
375 * or if in-band negotiation (as defined by phylink_autoneg_inband(@mode))
378 * Note that when 802.3z in-band negotiation is in use, it is possible
382 * If in-band negotiation mode is disabled, allow the link to come up. If
383 * @phy is non-%NULL, configure Energy Efficient Ethernet by calling
384 * phy_init_eee() and perform appropriate MAC configuration for EEE.
395 * struct phylink_pcs - PHYLINK PCS instance
398 * @neg_mode: provide PCS neg mode via "mode" argument
399 * @poll: poll the PCS for link changes
401 * to always be on. Standalone PCS drivers which
405 * This structure is designed to be embedded within the PCS private data,
406 * and will be passed between phylink and the PCS.
409 * the PCS driver.
420 * struct phylink_pcs_ops - MAC PCS operations structure.
422 * @pcs_enable: enable the PCS.
423 * @pcs_disable: disable the PCS.
424 * @pcs_pre_config: pre-mac_config method (for errata)
425 * @pcs_post_config: post-mac_config method (for arrata)
426 * @pcs_get_state: read the current MAC PCS link state from the hardware.
427 * @pcs_config: configure the MAC PCS for the selected mode and state.
429 * @pcs_link_up: program the PCS for the resolved link configuration
431 * @pcs_pre_init: configure PCS components necessary for MAC hardware
435 int (*pcs_validate)(struct phylink_pcs *pcs, unsigned long *supported,
437 int (*pcs_enable)(struct phylink_pcs *pcs);
438 void (*pcs_disable)(struct phylink_pcs *pcs);
439 void (*pcs_pre_config)(struct phylink_pcs *pcs,
441 int (*pcs_post_config)(struct phylink_pcs *pcs,
443 void (*pcs_get_state)(struct phylink_pcs *pcs,
445 int (*pcs_config)(struct phylink_pcs *pcs, unsigned int neg_mode,
449 void (*pcs_an_restart)(struct phylink_pcs *pcs);
450 void (*pcs_link_up)(struct phylink_pcs *pcs, unsigned int neg_mode,
452 int (*pcs_pre_init)(struct phylink_pcs *pcs);
455 #if 0 /* For kernel-doc purposes only. */
457 * pcs_validate() - validate the link configuration.
458 * @pcs: a pointer to a &struct phylink_pcs.
467 * Returns -EINVAL if the interface mode/autoneg mode is not supported.
468 * Returns non-zero positive if the link state can be supported.
470 int pcs_validate(struct phylink_pcs *pcs, unsigned long *supported,
474 * pcs_enable() - enable the PCS.
475 * @pcs: a pointer to a &struct phylink_pcs.
477 int pcs_enable(struct phylink_pcs *pcs);
480 * pcs_disable() - disable the PCS.
481 * @pcs: a pointer to a &struct phylink_pcs.
483 void pcs_disable(struct phylink_pcs *pcs);
486 * pcs_get_state() - Read the current inband link state from the hardware
487 * @pcs: a pointer to a &struct phylink_pcs.
490 * Read the current inband link state from the MAC PCS, reporting the
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,
493 * negotiation completion state in @state->an_complete, and link up state
494 * in @state->link. If possible, @state->lp_advertising should also be
497 void pcs_get_state(struct phylink_pcs *pcs,
501 * pcs_config() - Configure the PCS mode and advertisement
502 * @pcs: a pointer to a &struct phylink_pcs.
508 * Configure the PCS for the operating mode, the interface mode, and set
515 * For SGMII, there is no advertisement from the MAC side, the PCS should
518 * For 1000BASE-X, the advertisement should be programmed into the PCS.
520 * For most 10GBASE-R, there is no advertisement.
523 * functions, or for PCS that set pcs->neg_mode true, should be tested
526 int pcs_config(struct phylink_pcs *pcs, unsigned int neg_mode,
531 * pcs_an_restart() - restart 802.3z BaseX autonegotiation
532 * @pcs: a pointer to a &struct phylink_pcs.
534 * When PCS ops are present, this overrides mac_an_restart() in &struct
537 void pcs_an_restart(struct phylink_pcs *pcs);
540 * pcs_link_up() - program the PCS for the resolved link configuration
541 * @pcs: a pointer to a &struct phylink_pcs.
547 * This call will be made just before mac_link_up() to inform the PCS of
548 * the resolved link parameters. For example, a PCS operating in SGMII
549 * mode without in-band AN needs to be manually configured for the link
550 * and duplex setting. Otherwise, this should be a no-op.
553 * functions, or for PCS that set pcs->neg_mode true, should be tested
556 void pcs_link_up(struct phylink_pcs *pcs, unsigned int neg_mode,
560 * pcs_pre_init() - Configure PCS components necessary for MAC initialization
561 * @pcs: a pointer to a &struct phylink_pcs.
565 * should not be called after the link is brought up, as reconfiguring the PCS
569 * their associated PCS device before they can properly initialize their own
571 * which requires an active REF_CLK signal to be provided by the PHY/PCS.
573 * By calling phylink_pcs_pre_init(), MAC drivers can ensure that the PCS is
577 * model of PCS and the requirements of the MAC device attached to it. PCS
580 * driver authors should document their requirements for the PCS
581 * pre-initialization.
584 int pcs_pre_init(struct phylink_pcs *pcs);
607 int phylink_pcs_pre_init(struct phylink *pl, struct phylink_pcs *pcs);
629 int phylink_ethtool_get_eee(struct phylink *link, struct ethtool_keee *eee);
630 int phylink_ethtool_set_eee(struct phylink *link, struct ethtool_keee *eee);
647 * phylink_get_link_timer_ns - return the PCS link timer value
650 * Return the PCS link timer setting in nanoseconds for the PHY @interface
651 * mode, or -EINVAL if not appropriate.
667 return -EINVAL; in phylink_get_link_timer_ns()
673 void phylink_mii_c22_pcs_get_state(struct mdio_device *pcs,
677 int phylink_mii_c22_pcs_config(struct mdio_device *pcs,
681 void phylink_mii_c22_pcs_an_restart(struct mdio_device *pcs);
685 void phylink_mii_c45_pcs_get_state(struct mdio_device *pcs,