Lines Matching +full:eee +full:- +full:pcs

21 	MLO_AN_FIXED,	/* Fixed-link mode */
22 MLO_AN_INBAND, /* In-band protocol */
83 * struct phylink_link_state - link state structure
118 * struct phylink_config - PHYLINK configuration structure
126 * @ovr_an_inband: if true, override PCS to MLO_AN_INBAND
130 * are supported by the MAC/PCS.
147 * struct phylink_mac_ops - MAC operations structure.
149 * @mac_select_pcs: Select a PCS for the interface mode.
183 #if 0 /* For kernel-doc purposes only. */
185 * validate - Validate and update the link configuration
190 * Clear bits in the @supported and @state->advertising masks that
199 * When @config->supported_interfaces has been set, phylink will iterate
201 * MAC. The validation function must not print errors if @state->interface
204 * When @config->supported_interfaces is empty, phylink will call this
205 * function with @state->interface set to %PHY_INTERFACE_MODE_NA, and
208 * If the @state->interface mode is not supported, then the @supported
214 * mac_select_pcs: Select a PCS for the interface mode.
216 * @interface: PHY interface mode for PCS
221 * This must not modify any state. It is used to query which PCS should
224 * set the PCS that will be used.
230 * mac_pcs_get_state() - Read the current inband link state from the hardware
234 * Read the current inband link state from the MAC PCS, reporting the
235 * current speed in @state->speed, duplex mode in @state->duplex, pause
236 * mode in @state->pause using the %MLO_PAUSE_RX and %MLO_PAUSE_TX bits,
237 * negotiation completion state in @state->an_complete, and link up state
238 * in @state->link. If possible, @state->lp_advertising should also be
243 * PCS attached.
249 * mac_prepare() - prepare to change the PHY interface mode
261 * - mac_prepare()
262 * - mac_config()
263 * - pcs_config()
264 * - possible pcs_an_restart()
265 * - mac_finish()
274 * mac_config() - configure the MAC for the selected mode and state
279 * Note - not all members of @state are valid. In particular,
280 * @state->lp_advertising, @state->link, @state->an_complete are never
285 * in their &phylnk_config and which don't have a PCS), this function will be
286 * called on each link up event, and to also change the in-band advert. For
287 * non-legacy drivers, it will only be called to reconfigure the MAC for a
289 * in speed, duplex or pause modes or to change the in-band advertisement.
293 * (this requires a rewrite - please refer to mac_link_up() for situations
294 * where the PCS and MAC are not tightly integrated.)
296 * In all negotiation modes, as defined by @mode, @state->pause indicates the
300 * the results of in-band negotiation/status from the MAC PCS should be used
306 * Configure for non-inband negotiation mode, where the link settings
308 * protocol from the MAC is specified by @state->interface.
310 * @state->advertising may be used, but is not required.
312 * Older drivers (prior to the mac_link_up() change) may use @state->speed,
313 * @state->duplex and @state->pause to configure the MAC, but this is
323 * 1000base-X or Cisco SGMII mode depending on the @state->interface
332 * @state->interface. Duplex and pause modes are negotiated via
333 * the in-band configuration word. Advertised pause modes are set
334 * according to the @state->an_enabled and @state->advertising
339 * in the serial bitstream 16-bit configuration word, and the MAC
348 * requested settings - i.o.w., if nothing has changed between two
358 * mac_finish() - finish a to change the PHY interface mode
364 * complete any necessary steps after the MAC and PCS have been configured
365 * for the @mode and @iface. E.g. a MAC driver may wish to re-enable the
375 * mac_an_restart() - restart 802.3z BaseX autonegotiation
380 * PCS attached.
385 * mac_link_down() - take the link down
390 * If @mode is not an in-band negotiation mode (as defined by
399 * mac_link_up() - allow the link to come up
413 * where these settings are not automatically conveyed from the PCS block,
414 * or if in-band negotiation (as defined by phylink_autoneg_inband(@mode))
417 * Note that when 802.3z in-band negotiation is in use, it is possible
421 * If in-band negotiation mode is disabled, allow the link to come up. If
422 * @phy is non-%NULL, configure Energy Efficient Ethernet by calling
423 * phy_init_eee() and perform appropriate MAC configuration for EEE.
434 * struct phylink_pcs - PHYLINK PCS instance
436 * @poll: poll the PCS for link changes
438 * This structure is designed to be embedded within the PCS private data,
439 * and will be passed between phylink and the PCS.
447 * struct phylink_pcs_ops - MAC PCS operations structure.
449 * @pcs_get_state: read the current MAC PCS link state from the hardware.
450 * @pcs_config: configure the MAC PCS for the selected mode and state.
452 * @pcs_link_up: program the PCS for the resolved link configuration
456 int (*pcs_validate)(struct phylink_pcs *pcs, unsigned long *supported,
458 void (*pcs_get_state)(struct phylink_pcs *pcs,
460 int (*pcs_config)(struct phylink_pcs *pcs, unsigned int mode,
464 void (*pcs_an_restart)(struct phylink_pcs *pcs);
465 void (*pcs_link_up)(struct phylink_pcs *pcs, unsigned int mode,
469 #if 0 /* For kernel-doc purposes only. */
471 * pcs_validate() - validate the link configuration.
472 * @pcs: a pointer to a &struct phylink_pcs.
481 * Returns -EINVAL if the interface mode/autoneg mode is not supported.
482 * Returns non-zero positive if the link state can be supported.
484 int pcs_validate(struct phylink_pcs *pcs, unsigned long *supported,
488 * pcs_get_state() - Read the current inband link state from the hardware
489 * @pcs: a pointer to a &struct phylink_pcs.
492 * Read the current inband link state from the MAC PCS, reporting the
493 * current speed in @state->speed, duplex mode in @state->duplex, pause
494 * mode in @state->pause using the %MLO_PAUSE_RX and %MLO_PAUSE_TX bits,
495 * negotiation completion state in @state->an_complete, and link up state
496 * in @state->link. If possible, @state->lp_advertising should also be
502 void pcs_get_state(struct phylink_pcs *pcs,
506 * pcs_config() - Configure the PCS mode and advertisement
507 * @pcs: a pointer to a &struct phylink_pcs.
513 * Configure the PCS for the operating mode, the interface mode, and set
520 * For SGMII, there is no advertisement from the MAC side, the PCS should
523 * For 1000BASE-X, the advertisement should be programmed into the PCS.
525 * For most 10GBASE-R, there is no advertisement.
527 int pcs_config(struct phylink_pcs *pcs, unsigned int mode,
532 * pcs_an_restart() - restart 802.3z BaseX autonegotiation
533 * @pcs: a pointer to a &struct phylink_pcs.
535 * When PCS ops are present, this overrides mac_an_restart() in &struct
538 void pcs_an_restart(struct phylink_pcs *pcs);
541 * pcs_link_up() - program the PCS for the resolved link configuration
542 * @pcs: a pointer to a &struct phylink_pcs.
548 * This call will be made just before mac_link_up() to inform the PCS of
549 * the resolved link parameters. For example, a PCS operating in SGMII
550 * mode without in-band AN needs to be manually configured for the link
551 * and duplex setting. Otherwise, this should be a no-op.
553 void pcs_link_up(struct phylink_pcs *pcs, unsigned int mode,
618 void phylink_mii_c22_pcs_get_state(struct mdio_device *pcs,
622 int phylink_mii_c22_pcs_config(struct mdio_device *pcs, unsigned int mode,
625 void phylink_mii_c22_pcs_an_restart(struct mdio_device *pcs);
627 void phylink_mii_c45_pcs_get_state(struct mdio_device *pcs,