Lines Matching refs: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 {
656 static int phylink_validate_mac_and_pcs(struct phylink *pl,
707 static int phylink_validate_mask(struct phylink *pl, unsigned long *supported,
736 static int phylink_validate(struct phylink *pl, unsigned long *supported,
750 static int phylink_parse_fixedlink(struct phylink *pl,
862 static int phylink_parse_mode(struct phylink *pl,
994 static void phylink_apply_manual_flow(struct phylink *pl,
1075 static void phylink_pcs_poll_stop(struct phylink *pl)
1081 static void phylink_pcs_poll_start(struct phylink *pl)
1087 static void phylink_mac_config(struct phylink *pl,
1110 static void phylink_pcs_an_restart(struct phylink *pl)
1119 static void phylink_major_config(struct phylink *pl, bool restart,
1165 pl->pcs->phylink = NULL;
1167 pcs->phylink = pl;
1221 static int phylink_change_inband_advert(struct phylink *pl)
1259 static void phylink_mac_pcs_get_state(struct phylink *pl,
1288 static void phylink_get_fixed_state(struct phylink *pl,
1301 static void phylink_mac_initial_config(struct phylink *pl, bool force_restart)
1344 static void phylink_link_up(struct phylink *pl,
1400 static void phylink_link_down(struct phylink *pl)
1413 struct phylink *pl = container_of(w, struct phylink, resolve);
1530 static void phylink_run_resolve(struct phylink *pl)
1536 static void phylink_run_resolve_and_disable(struct phylink *pl, int bit)
1547 static void phylink_enable_and_run_resolve(struct phylink *pl, int bit)
1555 struct phylink *pl = container_of(t, struct phylink, link_poll);
1564 static int phylink_register_sfp(struct phylink *pl,
1588 * phylink_create() - create a phylink instance
1595 * Create a new phylink instance, and parse the link parameters found in @np.
1600 * Returns a pointer to a &struct phylink, or an error-pointer value. Users
1603 struct phylink *phylink_create(struct phylink_config *config,
1609 struct phylink *pl;
1615 "phylink: error: empty supported_interfaces\n");
1689 * phylink_destroy() - cleanup and destroy the phylink instance
1690 * @pl: a pointer to a &struct phylink returned from phylink_create()
1692 * Destroy a phylink instance. Any PHY that has been attached must have been
1697 void phylink_destroy(struct phylink *pl)
1709 * phylink_expects_phy() - Determine if phylink expects a phy to be attached
1710 * @pl: a pointer to a &struct phylink returned from phylink_create()
1715 * Returns true if phylink will be expecting a PHY.
1717 bool phylink_expects_phy(struct phylink *pl)
1729 struct phylink *pl = phydev->phylink;
1757 static int phylink_bringup_phy(struct phylink *pl, struct phy_device *phy,
1812 phy->phylink = pl;
1852 static int phylink_attach_phy(struct phylink *pl, struct phy_device *phy,
1867 * phylink_connect_phy() - connect a PHY to the phylink instance
1868 * @pl: a pointer to a &struct phylink returned from phylink_create()
1871 * Connect @phy to the phylink instance specified by @pl by calling
1876 * This updates the phylink's ethtool supported and advertising link mode
1881 int phylink_connect_phy(struct phylink *pl, struct phy_device *phy)
1905 * @pl: a pointer to a &struct phylink returned from phylink_create()
1909 * Connect the phy specified in the device node @dn to the phylink instance
1915 int phylink_of_phy_connect(struct phylink *pl, struct device_node *dn,
1924 * @pl: a pointer to a &struct phylink returned from phylink_create()
1928 * Connect the phy specified @fwnode to the phylink instance specified
1933 int phylink_fwnode_phy_connect(struct phylink *pl,
1981 * phylink_disconnect_phy() - disconnect any PHY attached to the phylink
1983 * @pl: a pointer to a &struct phylink returned from phylink_create()
1985 * Disconnect any current PHY from the phylink instance described by @pl.
1987 void phylink_disconnect_phy(struct phylink *pl)
2007 static void phylink_link_changed(struct phylink *pl, bool up, const char *what)
2016 * phylink_mac_change() - notify phylink of a change in MAC state
2017 * @pl: a pointer to a &struct phylink returned from phylink_create()
2023 void phylink_mac_change(struct phylink *pl, bool up)
2030 * phylink_pcs_change() - notify phylink of a change to PCS link state
2042 struct phylink *pl = pcs->phylink;
2051 struct phylink *pl = data;
2059 * phylink_start() - start a phylink instance
2060 * @pl: a pointer to a &struct phylink returned from phylink_create()
2062 * Start the phylink instance specified by @pl, configuring the MAC for the
2066 void phylink_start(struct phylink *pl)
2125 * phylink_stop() - stop a phylink instance
2126 * @pl: a pointer to a &struct phylink returned from phylink_create()
2128 * Stop the phylink instance specified by @pl. This should be called from the
2136 void phylink_stop(struct phylink *pl)
2160 * @pl: a pointer to a &struct phylink returned from phylink_create()
2172 void phylink_suspend(struct phylink *pl, bool mac_wol)
2204 * @pl: a pointer to a &struct phylink returned from phylink_create()
2209 void phylink_resume(struct phylink *pl)
2241 * @pl: a pointer to a &struct phylink returned from phylink_create()
2244 * Read the wake on lan parameters from the PHY attached to the phylink
2248 void phylink_ethtool_get_wol(struct phylink *pl, struct ethtool_wolinfo *wol)
2262 * @pl: a pointer to a &struct phylink returned from phylink_create()
2265 * Set the wake on lan parameters for the PHY attached to the phylink
2271 int phylink_ethtool_set_wol(struct phylink *pl, struct ethtool_wolinfo *wol)
2311 * @pl: a pointer to a &struct phylink returned from phylink_create()
2314 * Read the current link settings for the phylink instance specified by @pl.
2318 int phylink_ethtool_ksettings_get(struct phylink *pl,
2365 * @pl: a pointer to a &struct phylink returned from phylink_create()
2368 int phylink_ethtool_ksettings_set(struct phylink *pl,
2527 * @pl: a pointer to a &struct phylink returned from phylink_create()
2529 * Restart negotiation for the phylink instance specified by @pl. This will
2536 int phylink_ethtool_nway_reset(struct phylink *pl)
2552 * @pl: a pointer to a &struct phylink returned from phylink_create()
2555 void phylink_ethtool_get_pauseparam(struct phylink *pl,
2568 * @pl: a pointer to a &struct phylink returned from phylink_create()
2571 int phylink_ethtool_set_pauseparam(struct phylink *pl,
2655 * @pl: a pointer to a &struct phylink returned from phylink_create().
2658 * with the phylink instance specified by @pl.
2662 int phylink_get_eee_err(struct phylink *pl)
2677 * @pl: a pointer to a &struct phylink returned from phylink_create()
2682 int phylink_init_eee(struct phylink *pl, bool clk_stop_enable)
2695 * @pl: a pointer to a &struct phylink returned from phylink_create()
2698 int phylink_ethtool_get_eee(struct phylink *pl, struct ethtool_eee *eee)
2713 * @pl: a pointer to a &struct phylink returned from phylink_create()
2716 int phylink_ethtool_set_eee(struct phylink *pl, struct ethtool_eee *eee)
2755 static int phylink_phy_read(struct phylink *pl, unsigned int phy_id,
2797 static int phylink_phy_write(struct phylink *pl, unsigned int phy_id,
2838 static int phylink_mii_read(struct phylink *pl, unsigned int phy_id,
2866 static int phylink_mii_write(struct phylink *pl, unsigned int phy_id,
2885 * @pl: a pointer to a &struct phylink returned from phylink_create()
2889 * Perform the specified MII ioctl on the PHY attached to the phylink instance
2901 int phylink_mii_ioctl(struct phylink *pl, struct ifreq *ifr, int cmd)
2964 * @pl: a pointer to a &struct phylink returned from phylink_create()
2973 int phylink_speed_down(struct phylink *pl, bool sync)
2989 * @pl: a pointer to a &struct phylink returned from phylink_create()
2996 int phylink_speed_up(struct phylink *pl)
3011 struct phylink *pl = upstream;
3018 struct phylink *pl = upstream;
3036 static phy_interface_t phylink_choose_sfp_interface(struct phylink *pl,
3052 static void phylink_sfp_set_config(struct phylink *pl, u8 mode,
3089 static int phylink_sfp_config_phy(struct phylink *pl, u8 mode,
3144 static int phylink_sfp_config_optical(struct phylink *pl)
3215 struct phylink *pl = upstream;
3234 struct phylink *pl = upstream;
3253 struct phylink *pl = upstream;
3262 struct phylink *pl = upstream;
3271 struct phylink *pl = upstream;
3289 struct phylink *pl = upstream;
3527 * the phylink @state structure. This is suitable to be used for implementing
3577 * the phylink @state structure. This is suitable to be directly plugged