Lines Matching refs:phylink
3 * phylink models the MAC to optional PHY connection, supporting
16 #include <linux/phylink.h>
38 * struct phylink - internal data type for phylink
40 struct phylink {
156 static int phylink_validate(struct phylink *pl, unsigned long *supported,
164 static int phylink_parse_fixedlink(struct phylink *pl,
264 static int phylink_parse_mode(struct phylink *pl, struct fwnode_handle *fwnode)
382 static void phylink_apply_manual_flow(struct phylink *pl,
410 static void phylink_mac_config(struct phylink *pl,
425 static void phylink_mac_pcs_an_restart(struct phylink *pl)
437 static void phylink_major_config(struct phylink *pl, bool restart,
486 static int phylink_change_inband_advert(struct phylink *pl)
523 static void phylink_mac_pcs_get_state(struct phylink *pl,
547 static void phylink_get_fixed_state(struct phylink *pl,
559 static void phylink_mac_initial_config(struct phylink *pl, bool force_restart)
602 static void phylink_link_up(struct phylink *pl,
630 static void phylink_link_down(struct phylink *pl)
643 struct phylink *pl = container_of(w, struct phylink, resolve);
755 static void phylink_run_resolve(struct phylink *pl)
761 static void phylink_run_resolve_and_disable(struct phylink *pl, int bit)
774 struct phylink *pl = container_of(t, struct phylink, link_poll);
783 static int phylink_register_sfp(struct phylink *pl,
808 * phylink_create() - create a phylink instance
815 * Create a new phylink instance, and parse the link parameters found in @np.
820 * Returns a pointer to a &struct phylink, or an error-pointer value. Users
823 struct phylink *phylink_create(struct phylink_config *config,
828 struct phylink *pl;
895 * phylink_set_pcs() - set the current PCS for phylink to use
896 * @pl: a pointer to a &struct phylink returned from phylink_create()
899 * Bind the MAC PCS to phylink. This may be called after phylink_create(),
908 void phylink_set_pcs(struct phylink *pl, struct phylink_pcs *pcs)
916 * phylink_destroy() - cleanup and destroy the phylink instance
917 * @pl: a pointer to a &struct phylink returned from phylink_create()
919 * Destroy a phylink instance. Any PHY that has been attached must have been
924 void phylink_destroy(struct phylink *pl)
937 struct phylink *pl = phydev->phylink;
962 static int phylink_bringup_phy(struct phylink *pl, struct phy_device *phy,
1006 phy->phylink = pl;
1041 static int phylink_attach_phy(struct phylink *pl, struct phy_device *phy,
1056 * phylink_connect_phy() - connect a PHY to the phylink instance
1057 * @pl: a pointer to a &struct phylink returned from phylink_create()
1060 * Connect @phy to the phylink instance specified by @pl by calling
1065 * This updates the phylink's ethtool supported and advertising link mode
1070 int phylink_connect_phy(struct phylink *pl, struct phy_device *phy)
1094 * @pl: a pointer to a &struct phylink returned from phylink_create()
1098 * Connect the phy specified in the device node @dn to the phylink instance
1104 int phylink_of_phy_connect(struct phylink *pl, struct device_node *dn,
1149 * phylink_disconnect_phy() - disconnect any PHY attached to the phylink
1151 * @pl: a pointer to a &struct phylink returned from phylink_create()
1153 * Disconnect any current PHY from the phylink instance described by @pl.
1155 void phylink_disconnect_phy(struct phylink *pl)
1176 * phylink_mac_change() - notify phylink of a change in MAC state
1177 * @pl: a pointer to a &struct phylink returned from phylink_create()
1183 void phylink_mac_change(struct phylink *pl, bool up)
1194 struct phylink *pl = data;
1202 * phylink_start() - start a phylink instance
1203 * @pl: a pointer to a &struct phylink returned from phylink_create()
1205 * Start the phylink instance specified by @pl, configuring the MAC for the
1209 void phylink_start(struct phylink *pl)
1272 * phylink_stop() - stop a phylink instance
1273 * @pl: a pointer to a &struct phylink returned from phylink_create()
1275 * Stop the phylink instance specified by @pl. This should be called from the
1280 void phylink_stop(struct phylink *pl)
1300 * @pl: a pointer to a &struct phylink returned from phylink_create()
1303 * Read the wake on lan parameters from the PHY attached to the phylink
1307 void phylink_ethtool_get_wol(struct phylink *pl, struct ethtool_wolinfo *wol)
1321 * @pl: a pointer to a &struct phylink returned from phylink_create()
1324 * Set the wake on lan parameters for the PHY attached to the phylink
1330 int phylink_ethtool_set_wol(struct phylink *pl, struct ethtool_wolinfo *wol)
1367 * @pl: a pointer to a &struct phylink returned from phylink_create()
1370 * Read the current link settings for the phylink instance specified by @pl.
1374 int phylink_ethtool_ksettings_get(struct phylink *pl,
1422 * @pl: a pointer to a &struct phylink returned from phylink_create()
1425 int phylink_ethtool_ksettings_set(struct phylink *pl,
1577 * @pl: a pointer to a &struct phylink returned from phylink_create()
1579 * Restart negotiation for the phylink instance specified by @pl. This will
1586 int phylink_ethtool_nway_reset(struct phylink *pl)
1602 * @pl: a pointer to a &struct phylink returned from phylink_create()
1605 void phylink_ethtool_get_pauseparam(struct phylink *pl,
1618 * @pl: a pointer to a &struct phylink returned from phylink_create()
1621 int phylink_ethtool_set_pauseparam(struct phylink *pl,
1705 * @pl: a pointer to a &struct phylink returned from phylink_create().
1708 * with the phylink instance specified by @pl.
1712 int phylink_get_eee_err(struct phylink *pl)
1727 * @pl: a pointer to a &struct phylink returned from phylink_create()
1732 int phylink_init_eee(struct phylink *pl, bool clk_stop_enable)
1745 * @pl: a pointer to a &struct phylink returned from phylink_create()
1748 int phylink_ethtool_get_eee(struct phylink *pl, struct ethtool_eee *eee)
1763 * @pl: a pointer to a &struct phylink returned from phylink_create()
1766 int phylink_ethtool_set_eee(struct phylink *pl, struct ethtool_eee *eee)
1805 static int phylink_phy_read(struct phylink *pl, unsigned int phy_id,
1845 static int phylink_phy_write(struct phylink *pl, unsigned int phy_id,
1886 static int phylink_mii_read(struct phylink *pl, unsigned int phy_id,
1914 static int phylink_mii_write(struct phylink *pl, unsigned int phy_id,
1933 * @pl: a pointer to a &struct phylink returned from phylink_create()
1937 * Perform the specified MII ioctl on the PHY attached to the phylink instance
1949 int phylink_mii_ioctl(struct phylink *pl, struct ifreq *ifr, int cmd)
2012 * @pl: a pointer to a &struct phylink returned from phylink_create()
2021 int phylink_speed_down(struct phylink *pl, bool sync)
2037 * @pl: a pointer to a &struct phylink returned from phylink_create()
2044 int phylink_speed_up(struct phylink *pl)
2059 struct phylink *pl = upstream;
2066 struct phylink *pl = upstream;
2071 static int phylink_sfp_config(struct phylink *pl, u8 mode,
2158 struct phylink *pl = upstream;
2177 struct phylink *pl = upstream;
2197 struct phylink *pl = upstream;
2206 struct phylink *pl = upstream;
2215 struct phylink *pl = upstream;
2234 struct phylink *pl = upstream;
2429 * the phylink @state structure. This is suitable to be directly plugged
2484 * does not trigger a renegotiation; phylink will do that via the