Lines Matching defs:phylink

3  * phylink models the MAC to optional PHY connection, supporting
17 #include <linux/phylink.h>
44 * struct phylink - internal data type for phylink
46 struct phylink {
650 static int phylink_validate_mac_and_pcs(struct phylink *pl,
705 static void phylink_validate_one(struct phylink *pl, struct phy_device *phy,
735 static int phylink_validate_mask(struct phylink *pl, struct phy_device *phy,
754 static int phylink_validate(struct phylink *pl, unsigned long *supported,
769 static int phylink_parse_fixedlink(struct phylink *pl,
881 static int phylink_parse_mode(struct phylink *pl,
952 static void phylink_apply_manual_flow(struct phylink *pl,
1033 static void phylink_pcs_poll_stop(struct phylink *pl)
1039 static void phylink_pcs_poll_start(struct phylink *pl)
1045 int phylink_pcs_pre_init(struct phylink *pl, struct phylink_pcs *pcs)
1060 static void phylink_mac_config(struct phylink *pl,
1083 static void phylink_pcs_an_restart(struct phylink *pl)
1158 static void phylink_major_config(struct phylink *pl, bool restart,
1204 pl->pcs->phylink = NULL;
1206 pcs->phylink = pl;
1260 static int phylink_change_inband_advert(struct phylink *pl)
1298 static void phylink_mac_pcs_get_state(struct phylink *pl,
1327 static void phylink_get_fixed_state(struct phylink *pl,
1340 static void phylink_mac_initial_config(struct phylink *pl, bool force_restart)
1383 static void phylink_link_up(struct phylink *pl,
1439 static void phylink_link_down(struct phylink *pl)
1452 struct phylink *pl = container_of(w, struct phylink, resolve);
1569 static void phylink_run_resolve(struct phylink *pl)
1575 static void phylink_run_resolve_and_disable(struct phylink *pl, int bit)
1586 static void phylink_enable_and_run_resolve(struct phylink *pl, int bit)
1594 struct phylink *pl = container_of(t, struct phylink, link_poll);
1603 static int phylink_register_sfp(struct phylink *pl,
1627 * phylink_create() - create a phylink instance
1634 * Create a new phylink instance, and parse the link parameters found in @np.
1639 * Returns a pointer to a &struct phylink, or an error-pointer value. Users
1642 struct phylink *phylink_create(struct phylink_config *config,
1648 struct phylink *pl;
1654 "phylink: error: empty supported_interfaces\n");
1728 * phylink_destroy() - cleanup and destroy the phylink instance
1729 * @pl: a pointer to a &struct phylink returned from phylink_create()
1731 * Destroy a phylink instance. Any PHY that has been attached must have been
1736 void phylink_destroy(struct phylink *pl)
1748 * phylink_expects_phy() - Determine if phylink expects a phy to be attached
1749 * @pl: a pointer to a &struct phylink returned from phylink_create()
1754 * Returns true if phylink will be expecting a PHY.
1756 bool phylink_expects_phy(struct phylink *pl)
1768 struct phylink *pl = phydev->phylink;
1796 static int phylink_validate_phy(struct phylink *pl, struct phy_device *phy,
1869 static int phylink_bringup_phy(struct phylink *pl, struct phy_device *phy,
1901 phy->phylink = pl;
1941 static int phylink_attach_phy(struct phylink *pl, struct phy_device *phy,
1961 * phylink_connect_phy() - connect a PHY to the phylink instance
1962 * @pl: a pointer to a &struct phylink returned from phylink_create()
1965 * Connect @phy to the phylink instance specified by @pl by calling
1970 * This updates the phylink's ethtool supported and advertising link mode
1975 int phylink_connect_phy(struct phylink *pl, struct phy_device *phy)
1999 * @pl: a pointer to a &struct phylink returned from phylink_create()
2003 * Connect the phy specified in the device node @dn to the phylink instance
2009 int phylink_of_phy_connect(struct phylink *pl, struct device_node *dn,
2018 * @pl: a pointer to a &struct phylink returned from phylink_create()
2022 * Connect the phy specified @fwnode to the phylink instance specified
2027 int phylink_fwnode_phy_connect(struct phylink *pl,
2078 * phylink_disconnect_phy() - disconnect any PHY attached to the phylink
2080 * @pl: a pointer to a &struct phylink returned from phylink_create()
2082 * Disconnect any current PHY from the phylink instance described by @pl.
2084 void phylink_disconnect_phy(struct phylink *pl)
2104 static void phylink_link_changed(struct phylink *pl, bool up, const char *what)
2113 * phylink_mac_change() - notify phylink of a change in MAC state
2114 * @pl: a pointer to a &struct phylink returned from phylink_create()
2120 void phylink_mac_change(struct phylink *pl, bool up)
2127 * phylink_pcs_change() - notify phylink of a change to PCS link state
2139 struct phylink *pl = pcs->phylink;
2148 struct phylink *pl = data;
2156 * phylink_start() - start a phylink instance
2157 * @pl: a pointer to a &struct phylink returned from phylink_create()
2159 * Start the phylink instance specified by @pl, configuring the MAC for the
2163 void phylink_start(struct phylink *pl)
2222 * phylink_stop() - stop a phylink instance
2223 * @pl: a pointer to a &struct phylink returned from phylink_create()
2225 * Stop the phylink instance specified by @pl. This should be called from the
2233 void phylink_stop(struct phylink *pl)
2257 * @pl: a pointer to a &struct phylink returned from phylink_create()
2269 void phylink_suspend(struct phylink *pl, bool mac_wol)
2301 * @pl: a pointer to a &struct phylink returned from phylink_create()
2306 void phylink_resume(struct phylink *pl)
2338 * @pl: a pointer to a &struct phylink returned from phylink_create()
2341 * Read the wake on lan parameters from the PHY attached to the phylink
2345 void phylink_ethtool_get_wol(struct phylink *pl, struct ethtool_wolinfo *wol)
2359 * @pl: a pointer to a &struct phylink returned from phylink_create()
2362 * Set the wake on lan parameters for the PHY attached to the phylink
2368 int phylink_ethtool_set_wol(struct phylink *pl, struct ethtool_wolinfo *wol)
2408 * @pl: a pointer to a &struct phylink returned from phylink_create()
2411 * Read the current link settings for the phylink instance specified by @pl.
2415 int phylink_ethtool_ksettings_get(struct phylink *pl,
2462 * @pl: a pointer to a &struct phylink returned from phylink_create()
2465 int phylink_ethtool_ksettings_set(struct phylink *pl,
2624 * @pl: a pointer to a &struct phylink returned from phylink_create()
2626 * Restart negotiation for the phylink instance specified by @pl. This will
2633 int phylink_ethtool_nway_reset(struct phylink *pl)
2649 * @pl: a pointer to a &struct phylink returned from phylink_create()
2652 void phylink_ethtool_get_pauseparam(struct phylink *pl,
2665 * @pl: a pointer to a &struct phylink returned from phylink_create()
2668 int phylink_ethtool_set_pauseparam(struct phylink *pl,
2752 * @pl: a pointer to a &struct phylink returned from phylink_create().
2755 * with the phylink instance specified by @pl.
2759 int phylink_get_eee_err(struct phylink *pl)
2774 * @pl: a pointer to a &struct phylink returned from phylink_create()
2779 int phylink_init_eee(struct phylink *pl, bool clk_stop_enable)
2792 * @pl: a pointer to a &struct phylink returned from phylink_create()
2795 int phylink_ethtool_get_eee(struct phylink *pl, struct ethtool_keee *eee)
2810 * @pl: a pointer to a &struct phylink returned from phylink_create()
2813 int phylink_ethtool_set_eee(struct phylink *pl, struct ethtool_keee *eee)
2852 static int phylink_phy_read(struct phylink *pl, unsigned int phy_id,
2894 static int phylink_phy_write(struct phylink *pl, unsigned int phy_id,
2935 static int phylink_mii_read(struct phylink *pl, unsigned int phy_id,
2963 static int phylink_mii_write(struct phylink *pl, unsigned int phy_id,
2982 * @pl: a pointer to a &struct phylink returned from phylink_create()
2986 * Perform the specified MII ioctl on the PHY attached to the phylink instance
2998 int phylink_mii_ioctl(struct phylink *pl, struct ifreq *ifr, int cmd)
3061 * @pl: a pointer to a &struct phylink returned from phylink_create()
3070 int phylink_speed_down(struct phylink *pl, bool sync)
3086 * @pl: a pointer to a &struct phylink returned from phylink_create()
3093 int phylink_speed_up(struct phylink *pl)
3108 struct phylink *pl = upstream;
3115 struct phylink *pl = upstream;
3120 static phy_interface_t phylink_choose_sfp_interface(struct phylink *pl,
3136 static void phylink_sfp_set_config(struct phylink *pl, u8 mode,
3173 static int phylink_sfp_config_phy(struct phylink *pl, u8 mode,
3228 static int phylink_sfp_config_optical(struct phylink *pl)
3300 struct phylink *pl = upstream;
3319 struct phylink *pl = upstream;
3338 struct phylink *pl = upstream;
3347 struct phylink *pl = upstream;
3356 struct phylink *pl = upstream;
3374 struct phylink *pl = upstream;
3612 * the phylink @state structure. This is suitable to be used for implementing
3662 * the phylink @state structure. This is suitable to be directly plugged
3830 MODULE_DESCRIPTION("phylink models the MAC to optional PHY connection");