--- zzzz-none-000/linux-4.4.60/include/linux/phy.h 2017-04-08 07:53:53.000000000 +0000 +++ scorpion-7490-727/linux-4.4.60/include/linux/phy.h 2021-02-04 17:41:59.000000000 +0000 @@ -501,6 +501,12 @@ /* Determines the negotiated speed and duplex */ int (*read_status)(struct phy_device *phydev); + /* + * Update the value in phydev->link to reflect the + * current link value + */ + int (*update_link)(struct phy_device *phydev); + /* Clears any pending interrupts */ int (*ack_interrupt)(struct phy_device *phydev); @@ -513,6 +519,12 @@ */ int (*did_interrupt)(struct phy_device *phydev); + /* + * Called before an ethernet device is detached + * from the PHY. + */ + void (*detach)(struct phy_device *phydev); + /* Clears up any memory if needed */ void (*remove)(struct phy_device *phydev); @@ -796,6 +808,7 @@ void phy_stop_machine(struct phy_device *phydev); int phy_ethtool_sset(struct phy_device *phydev, struct ethtool_cmd *cmd); int phy_ethtool_gset(struct phy_device *phydev, struct ethtool_cmd *cmd); +int phy_ethtool_ioctl(struct phy_device *phydev, void *useraddr); int phy_mii_ioctl(struct phy_device *phydev, struct ifreq *ifr, int cmd); int phy_start_interrupts(struct phy_device *phydev); void phy_print_status(struct phy_device *phydev); @@ -822,6 +835,23 @@ extern struct bus_type mdio_bus_type; +struct mdio_board_info { + const char *bus_id; + int phy_addr; + + const void *platform_data; +}; + +#ifdef CONFIG_MDIO_BOARDINFO +int mdiobus_register_board_info(const struct mdio_board_info *info, unsigned n); +#else +static inline int +mdiobus_register_board_info(const struct mdio_board_info *info, unsigned n) +{ + return 0; +} +#endif + /** * module_phy_driver() - Helper macro for registering PHY drivers * @__phy_drivers: array of PHY drivers to register