Lines Matching defs:interface

165 static unsigned int phylink_interface_signal_rate(phy_interface_t interface)
167 switch (interface) {
183 * phylink_interface_max_speed() - get the maximum speed of a phy interface
184 * @interface: phy interface mode defined by &typedef phy_interface_t
186 * Determine the maximum speed of a phy interface. This is intended to help
190 * Return: The maximum speed of @interface
192 static int phylink_interface_max_speed(phy_interface_t interface)
194 switch (interface) {
247 /* If we get here, someone forgot to add an interface mode above */
473 * @interface: phy interface mode defined by &typedef phy_interface_t
477 * Get the MAC capabilities that are supported by the @interface mode and
480 unsigned long phylink_get_capabilities(phy_interface_t interface,
484 int max_speed = phylink_interface_max_speed(interface);
488 switch (interface) {
580 /* We can't adapt if the MAC doesn't support the interface's
596 /* The MAC must support half duplex at the interface's max
619 * aren't constant, such as if they vary depending on the interface.
630 caps = phylink_get_capabilities(state->interface, mac_capabilities,
663 /* Get the PCS for this interface mode */
665 pcs = pl->mac_ops->mac_select_pcs(pl->config, state->interface);
678 phylink_err(pl, "interface %s: uninitialised PCS\n",
679 phy_modes(state->interface));
722 t.interface = intf;
741 if (state->interface == PHY_INTERFACE_MODE_NA)
744 if (!test_bit(state->interface, interfaces))
889 switch (pl->link_config.interface) {
978 phy_modes(pl->link_config.interface));
1023 phy_interface_t interface)
1026 pcs->ops->pcs_pre_config(pcs, interface);
1030 phy_interface_t interface)
1035 err = pcs->ops->pcs_post_config(pcs, interface);
1063 return pcs->ops->pcs_config(pcs, neg_mode, state->interface,
1068 phy_interface_t interface, int speed,
1072 pcs->ops->pcs_link_up(pcs, neg_mode, interface, speed, duplex);
1102 phy_modes(st.interface),
1114 phy_interface_mode_is_8023z(pl->link_config.interface) &&
1128 phylink_dbg(pl, "major config %s\n", phy_modes(state->interface));
1131 state->interface,
1135 pcs = pl->mac_ops->mac_select_pcs(pl->config, state->interface);
1150 state->interface);
1173 phylink_pcs_pre_config(pl->pcs, state->interface);
1178 phylink_pcs_post_config(pl->pcs, state->interface);
1200 state->interface);
1207 rate_kbd = phylink_interface_signal_rate(state->interface);
1231 phy_modes(pl->link_config.interface),
1237 pl->link_config.interface,
1264 state->interface = pl->link_config.interface;
1316 if (link_state.interface == PHY_INTERFACE_MODE_SGMII)
1359 * the link_state) to the interface speed, and will send
1362 speed = phylink_interface_max_speed(link_state.interface);
1369 * the link_state) to the interface speed, and will cause
1372 speed = phylink_interface_max_speed(link_state.interface);
1377 pl->cur_interface = link_state.interface;
1469 /* If the interface has changed, force a
1473 if (link_state.interface !=
1474 pl->phy_state.interface) {
1478 link_state.interface = pl->phy_state.interface;
1503 if (link_state.interface != pl->link_config.interface) {
1504 /* The interface has changed, force the link down and
1512 pl->link_config.interface = link_state.interface;
1591 * interface
1643 pl->phy_state.interface = iface;
1649 pl->link_config.interface = iface;
1721 phy_interface_mode_is_8023z(pl->link_config.interface)))
1743 pl->phy_state.interface = phydev->interface;
1750 phy_modes(phydev->interface),
1758 phy_interface_t interface)
1778 /* Check whether we would use rate matching for the proposed interface
1781 config.rate_matching = phy_get_rate_matching(phy, interface);
1785 * For some interface modes (e.g. RXAUI, XAUI and USXGMII) switching
1788 * For these which switch interface modes, we really need to know which
1789 * interface modes the PHY supports to properly work out which ethtool
1791 * against all interface modes, which may lead to more ethtool link
1795 interface != PHY_INTERFACE_MODE_RXAUI &&
1796 interface != PHY_INTERFACE_MODE_XAUI &&
1797 interface != PHY_INTERFACE_MODE_USXGMII)
1798 config.interface = PHY_INTERFACE_MODE_NA;
1800 config.interface = interface;
1805 phy_modes(config.interface),
1824 pl->phy_state.interface = interface;
1839 phy_modes(interface),
1853 phy_interface_t interface)
1857 phy_interface_mode_is_8023z(interface) && !pl->sfp_bus)))
1863 return phy_attach_direct(pl->netdev, phy, 0, interface);
1885 /* Use PHY device/driver interface */
1887 pl->link_interface = phy->interface;
1888 pl->link_config.interface = pl->link_interface;
1895 ret = phylink_bringup_phy(pl, phy, pl->link_config.interface);
1960 /* Use PHY device/driver interface */
1962 pl->link_interface = phy_dev->interface;
1963 pl->link_config.interface = pl->link_interface;
1972 ret = phylink_bringup_phy(pl, phy_dev, pl->link_config.interface);
2074 phy_modes(pl->link_config.interface));
2388 * - link_config.interface will be updated by the PHY calling
2462 * also cause the associated interface to be selected such that the
2466 config.interface = sfp_select_interface(pl->sfp_bus,
2468 if (config.interface == PHY_INTERFACE_MODE_NA) {
2470 "selection of interface failed, advertisement %*pb\n",
2476 /* Revalidate with the selected interface */
2481 phy_modes(config.interface),
2502 if (pl->link_config.interface != config.interface) {
2503 /* The interface changed, e.g. 1000base-X <-> 2500base-X */
2504 /* We need to force the link down, then change the interface */
2512 pl->link_config.interface = config.interface;
2884 * phylink_mii_ioctl() - generic mii ioctl interface
3039 phy_interface_t interface;
3042 interface = PHY_INTERFACE_MODE_NA;
3045 interface = phylink_sfp_interface_preference[i];
3049 return interface;
3059 phylink_an_mode_str(mode), phy_modes(state->interface),
3073 pl->link_config.interface != state->interface) {
3075 pl->link_config.interface = state->interface;
3081 phy_modes(state->interface));
3102 config.interface = PHY_INTERFACE_MODE_NA;
3119 "selection of interface failed, advertisement %*pb\n",
3124 config.interface = iface;
3131 phy_modes(config.interface),
3149 phy_interface_t interface;
3164 phylink_err(pl, "unsupported SFP module: no common interface modes\n");
3185 interface = phylink_choose_sfp_interface(pl, interfaces);
3186 if (interface == PHY_INTERFACE_MODE_NA) {
3187 phylink_err(pl, "failed to select SFP interface\n");
3191 phylink_dbg(pl, "optical SFP: chosen %s interface\n",
3192 phy_modes(interface));
3194 config.interface = interface;
3290 phy_interface_t interface;
3317 interface = pl->link_config.interface;
3318 ret = phylink_attach_phy(pl, phy, interface);
3322 ret = phylink_bringup_phy(pl, phy, interface);
3543 switch (state->interface) {
3600 * @interface: the PHY interface mode being configured
3606 * Encode the clause 37 PCS advertisement as specified by @interface and
3611 int phylink_mii_c22_pcs_encode_advertisement(phy_interface_t interface,
3616 switch (interface) {
3640 * @interface: the PHY interface mode being configured
3645 * parameters for the @mode, @interface and @advertising parameters.
3650 phy_interface_t interface,
3658 adv = phylink_mii_c22_pcs_encode_advertisement(interface, advertising);
3721 switch (state->interface) {