Lines Matching full:pcs

47 	struct phylink_pcs *pcs;  member
597 struct phylink_pcs *pcs; in phylink_validate_mac_and_pcs() local
600 /* Get the PCS for this interface mode */ in phylink_validate_mac_and_pcs()
602 pcs = pl->mac_ops->mac_select_pcs(pl->config, state->interface); in phylink_validate_mac_and_pcs()
603 if (IS_ERR(pcs)) in phylink_validate_mac_and_pcs()
604 return PTR_ERR(pcs); in phylink_validate_mac_and_pcs()
606 pcs = pl->pcs; in phylink_validate_mac_and_pcs()
609 if (pcs) { in phylink_validate_mac_and_pcs()
610 /* The PCS, if present, must be setup before phylink_create() in phylink_validate_mac_and_pcs()
614 if (!pcs->ops) { in phylink_validate_mac_and_pcs()
615 phylink_err(pl, "interface %s: uninitialised PCS\n", in phylink_validate_mac_and_pcs()
621 /* Validate the link parameters with the PCS */ in phylink_validate_mac_and_pcs()
622 if (pcs->ops->pcs_validate) { in phylink_validate_mac_and_pcs()
623 ret = pcs->ops->pcs_validate(pcs, supported, state); in phylink_validate_mac_and_pcs()
915 /* Check if MAC/PCS also supports Autoneg. */ in phylink_parse_mode()
958 if (pl->pcs && pl->pcs->poll && pl->cfg_link_an_mode == MLO_AN_INBAND) in phylink_pcs_poll_start()
983 if (pl->pcs) in phylink_mac_pcs_an_restart()
984 pl->pcs->ops->pcs_an_restart(pl->pcs); in phylink_mac_pcs_an_restart()
993 struct phylink_pcs *pcs = NULL; in phylink_major_config() local
1000 pcs = pl->mac_ops->mac_select_pcs(pl->config, state->interface); in phylink_major_config()
1001 if (IS_ERR(pcs)) { in phylink_major_config()
1004 pcs); in phylink_major_config()
1008 pcs_changed = pcs && pl->pcs != pcs; in phylink_major_config()
1023 /* If we have a new PCS, switch to the new PCS after preparing the MAC in phylink_major_config()
1027 pl->pcs = pcs; in phylink_major_config()
1031 if (pl->pcs) { in phylink_major_config()
1032 err = pl->pcs->ops->pcs_config(pl->pcs, pl->cur_link_an_mode, in phylink_major_config()
1059 * If we have a separate PCS, we only need to call its pcs_config() method,
1070 if (!pl->pcs && pl->config->legacy_pre_march2020) { in phylink_change_inband_advert()
1083 /* Modern PCS-based method; update the advert at the PCS, and in phylink_change_inband_advert()
1087 ret = pl->pcs->ops->pcs_config(pl->pcs, pl->cur_link_an_mode, in phylink_change_inband_advert()
1121 if (pl->pcs) in phylink_mac_pcs_get_state()
1122 pl->pcs->ops->pcs_get_state(pl->pcs, state); in phylink_mac_pcs_get_state()
1222 if (pl->pcs && pl->pcs->ops->pcs_link_up) in phylink_link_up()
1223 pl->pcs->ops->pcs_link_up(pl->pcs, pl->cur_link_an_mode, in phylink_link_up()
1288 /* The PCS may have a latching link-fail indicator. in phylink_resolve()
1291 * PCS state to get the current status of the link. in phylink_resolve()
1353 } else if (!pl->pcs && pl->config->legacy_pre_march2020) { in phylink_resolve()
1356 * old mac_config() method to configure the MAC/PCS in phylink_resolve()
1917 if (pl->pcs) in phylink_start()
1918 poll |= pl->pcs->poll; in phylink_start()
2152 /* The MAC is reporting the link results from its own PCS in phylink_ethtool_ksettings_get()
2955 /* Find the union of the supported interfaces by the PCS/MAC and in phylink_sfp_config_optical()
3206 * phylink_decode_usxgmii_word() - decode the USXGMII word from a MAC PCS
3210 * Helper for MAC PCS supporting the USXGMII protocol and the auto-negotiation
3249 * phylink_mii_c22_pcs_decode_state() - Decode MAC PCS state from MII registers
3254 * Helper for MAC PCS supporting the 802.3 clause 22 register set for
3296 * phylink_mii_c22_pcs_get_state() - read the MAC PCS state
3297 * @pcs: a pointer to a &struct mdio_device.
3300 * Helper for MAC PCS supporting the 802.3 clause 22 register set for
3303 * Read the MAC PCS state from the MII device configured in @config and
3309 void phylink_mii_c22_pcs_get_state(struct mdio_device *pcs, in phylink_mii_c22_pcs_get_state() argument
3314 bmsr = mdiodev_read(pcs, MII_BMSR); in phylink_mii_c22_pcs_get_state()
3315 lpa = mdiodev_read(pcs, MII_LPA); in phylink_mii_c22_pcs_get_state()
3326 * phylink_mii_c22_pcs_encode_advertisement() - configure the clause 37 PCS
3331 * Helper for MAC PCS supporting the 802.3 clause 22 register set for
3334 * Encode the clause 37 PCS advertisement as specified by @interface and
3366 * phylink_mii_c22_pcs_config() - configure clause 22 PCS
3367 * @pcs: a pointer to a &struct mdio_device.
3372 * Configure a Clause 22 PCS PHY with the appropriate negotiation
3377 int phylink_mii_c22_pcs_config(struct mdio_device *pcs, unsigned int mode, in phylink_mii_c22_pcs_config() argument
3387 ret = mdiobus_modify_changed(pcs->bus, pcs->addr, in phylink_mii_c22_pcs_config()
3403 ret = mdiodev_modify(pcs, MII_BMCR, BMCR_ANENABLE | BMCR_ISOLATE, bmcr); in phylink_mii_c22_pcs_config()
3413 * @pcs: a pointer to a &struct mdio_device.
3415 * Helper for MAC PCS supporting the 802.3 clause 22 register set for
3422 void phylink_mii_c22_pcs_an_restart(struct mdio_device *pcs) in phylink_mii_c22_pcs_an_restart() argument
3424 int val = mdiodev_read(pcs, MII_BMCR); in phylink_mii_c22_pcs_an_restart()
3429 mdiodev_write(pcs, MII_BMCR, val); in phylink_mii_c22_pcs_an_restart()
3434 void phylink_mii_c45_pcs_get_state(struct mdio_device *pcs, in phylink_mii_c45_pcs_get_state() argument
3437 struct mii_bus *bus = pcs->bus; in phylink_mii_c45_pcs_get_state()
3438 int addr = pcs->addr; in phylink_mii_c45_pcs_get_state()