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 {
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 static void phylink_mac_config(struct phylink *pl,
1068 static void phylink_pcs_an_restart(struct phylink *pl)
1143 static void phylink_major_config(struct phylink *pl, bool restart,
1189 pl->pcs->phylink = NULL;
1191 pcs->phylink = pl;
1245 static int phylink_change_inband_advert(struct phylink *pl)
1283 static void phylink_mac_pcs_get_state(struct phylink *pl,
1312 static void phylink_get_fixed_state(struct phylink *pl,
1325 static void phylink_mac_initial_config(struct phylink *pl, bool force_restart)
1368 static void phylink_link_up(struct phylink *pl,
1424 static void phylink_link_down(struct phylink *pl)
1437 struct phylink *pl = container_of(w, struct phylink, resolve);
1554 static void phylink_run_resolve(struct phylink *pl)
1560 static void phylink_run_resolve_and_disable(struct phylink *pl, int bit)
1571 static void phylink_enable_and_run_resolve(struct phylink *pl, int bit)
1579 struct phylink *pl = container_of(t, struct phylink, link_poll);
1588 static int phylink_register_sfp(struct phylink *pl,
1612 * phylink_create() - create a phylink instance
1619 * Create a new phylink instance, and parse the link parameters found in @np.
1624 * Returns a pointer to a &struct phylink, or an error-pointer value. Users
1627 struct phylink *phylink_create(struct phylink_config *config,
1633 struct phylink *pl;
1639 "phylink: error: empty supported_interfaces\n");
1713 * phylink_destroy() - cleanup and destroy the phylink instance
1714 * @pl: a pointer to a &struct phylink returned from phylink_create()
1716 * Destroy a phylink instance. Any PHY that has been attached must have been
1721 void phylink_destroy(struct phylink *pl)
1733 * phylink_expects_phy() - Determine if phylink expects a phy to be attached
1734 * @pl: a pointer to a &struct phylink returned from phylink_create()
1739 * Returns true if phylink will be expecting a PHY.
1741 bool phylink_expects_phy(struct phylink *pl)
1753 struct phylink *pl = phydev->phylink;
1781 static int phylink_validate_phy(struct phylink *pl, struct phy_device *phy,
1851 static int phylink_bringup_phy(struct phylink *pl, struct phy_device *phy,
1883 phy->phylink = pl;
1923 static int phylink_attach_phy(struct phylink *pl, struct phy_device *phy,
1938 * phylink_connect_phy() - connect a PHY to the phylink instance
1939 * @pl: a pointer to a &struct phylink returned from phylink_create()
1942 * Connect @phy to the phylink instance specified by @pl by calling
1947 * This updates the phylink's ethtool supported and advertising link mode
1952 int phylink_connect_phy(struct phylink *pl, struct phy_device *phy)
1976 * @pl: a pointer to a &struct phylink returned from phylink_create()
1980 * Connect the phy specified in the device node @dn to the phylink instance
1986 int phylink_of_phy_connect(struct phylink *pl, struct device_node *dn,
1995 * @pl: a pointer to a &struct phylink returned from phylink_create()
1999 * Connect the phy specified @fwnode to the phylink instance specified
2004 int phylink_fwnode_phy_connect(struct phylink *pl,
2052 * phylink_disconnect_phy() - disconnect any PHY attached to the phylink
2054 * @pl: a pointer to a &struct phylink returned from phylink_create()
2056 * Disconnect any current PHY from the phylink instance described by @pl.
2058 void phylink_disconnect_phy(struct phylink *pl)
2078 static void phylink_link_changed(struct phylink *pl, bool up, const char *what)
2087 * phylink_mac_change() - notify phylink of a change in MAC state
2088 * @pl: a pointer to a &struct phylink returned from phylink_create()
2094 void phylink_mac_change(struct phylink *pl, bool up)
2101 * phylink_pcs_change() - notify phylink of a change to PCS link state
2113 struct phylink *pl = pcs->phylink;
2122 struct phylink *pl = data;
2130 * phylink_start() - start a phylink instance
2131 * @pl: a pointer to a &struct phylink returned from phylink_create()
2133 * Start the phylink instance specified by @pl, configuring the MAC for the
2137 void phylink_start(struct phylink *pl)
2196 * phylink_stop() - stop a phylink instance
2197 * @pl: a pointer to a &struct phylink returned from phylink_create()
2199 * Stop the phylink instance specified by @pl. This should be called from the
2207 void phylink_stop(struct phylink *pl)
2231 * @pl: a pointer to a &struct phylink returned from phylink_create()
2243 void phylink_suspend(struct phylink *pl, bool mac_wol)
2275 * @pl: a pointer to a &struct phylink returned from phylink_create()
2280 void phylink_resume(struct phylink *pl)
2312 * @pl: a pointer to a &struct phylink returned from phylink_create()
2315 * Read the wake on lan parameters from the PHY attached to the phylink
2319 void phylink_ethtool_get_wol(struct phylink *pl, struct ethtool_wolinfo *wol)
2333 * @pl: a pointer to a &struct phylink returned from phylink_create()
2336 * Set the wake on lan parameters for the PHY attached to the phylink
2342 int phylink_ethtool_set_wol(struct phylink *pl, struct ethtool_wolinfo *wol)
2382 * @pl: a pointer to a &struct phylink returned from phylink_create()
2385 * Read the current link settings for the phylink instance specified by @pl.
2389 int phylink_ethtool_ksettings_get(struct phylink *pl,
2436 * @pl: a pointer to a &struct phylink returned from phylink_create()
2439 int phylink_ethtool_ksettings_set(struct phylink *pl,
2598 * @pl: a pointer to a &struct phylink returned from phylink_create()
2600 * Restart negotiation for the phylink instance specified by @pl. This will
2607 int phylink_ethtool_nway_reset(struct phylink *pl)
2623 * @pl: a pointer to a &struct phylink returned from phylink_create()
2626 void phylink_ethtool_get_pauseparam(struct phylink *pl,
2639 * @pl: a pointer to a &struct phylink returned from phylink_create()
2642 int phylink_ethtool_set_pauseparam(struct phylink *pl,
2726 * @pl: a pointer to a &struct phylink returned from phylink_create().
2729 * with the phylink instance specified by @pl.
2733 int phylink_get_eee_err(struct phylink *pl)
2748 * @pl: a pointer to a &struct phylink returned from phylink_create()
2753 int phylink_init_eee(struct phylink *pl, bool clk_stop_enable)
2766 * @pl: a pointer to a &struct phylink returned from phylink_create()
2769 int phylink_ethtool_get_eee(struct phylink *pl, struct ethtool_keee *eee)
2784 * @pl: a pointer to a &struct phylink returned from phylink_create()
2787 int phylink_ethtool_set_eee(struct phylink *pl, struct ethtool_keee *eee)
2826 static int phylink_phy_read(struct phylink *pl, unsigned int phy_id,
2868 static int phylink_phy_write(struct phylink *pl, unsigned int phy_id,
2909 static int phylink_mii_read(struct phylink *pl, unsigned int phy_id,
2937 static int phylink_mii_write(struct phylink *pl, unsigned int phy_id,
2956 * @pl: a pointer to a &struct phylink returned from phylink_create()
2960 * Perform the specified MII ioctl on the PHY attached to the phylink instance
2972 int phylink_mii_ioctl(struct phylink *pl, struct ifreq *ifr, int cmd)
3035 * @pl: a pointer to a &struct phylink returned from phylink_create()
3044 int phylink_speed_down(struct phylink *pl, bool sync)
3060 * @pl: a pointer to a &struct phylink returned from phylink_create()
3067 int phylink_speed_up(struct phylink *pl)
3082 struct phylink *pl = upstream;
3089 struct phylink *pl = upstream;
3094 static phy_interface_t phylink_choose_sfp_interface(struct phylink *pl,
3110 static void phylink_sfp_set_config(struct phylink *pl, u8 mode,
3147 static int phylink_sfp_config_phy(struct phylink *pl, u8 mode,
3202 static int phylink_sfp_config_optical(struct phylink *pl)
3274 struct phylink *pl = upstream;
3293 struct phylink *pl = upstream;
3312 struct phylink *pl = upstream;
3321 struct phylink *pl = upstream;
3330 struct phylink *pl = upstream;
3348 struct phylink *pl = upstream;
3586 * the phylink @state structure. This is suitable to be used for implementing
3636 * the phylink @state structure. This is suitable to be directly plugged
3804 MODULE_DESCRIPTION("phylink models the MAC to optional PHY connection");