--- zzzz-none-000/linux-4.9.218/include/linux/phy.h 2020-04-02 15:20:41.000000000 +0000 +++ seale-7590ax-750/linux-4.9.218/include/linux/phy.h 2023-03-29 10:59:07.000000000 +0000 @@ -162,6 +162,8 @@ void *priv; int (*read)(struct mii_bus *bus, int addr, int regnum); int (*write)(struct mii_bus *bus, int addr, int regnum, u16 val); + int (*mmd_read)(struct mii_bus *bus, int addr, int regnum, int devad); + int (*mmd_write)(struct mii_bus *bus, int addr, int regnum, int devad, u16 val); int (*reset)(struct mii_bus *bus); /* @@ -348,6 +350,8 @@ * speed, duplex, pause, supported, advertising, lp_advertising, * and autoneg are used like in mii_if_info * + * port is the current port + * * interrupts currently only supports enabled or disabled, * but could be changed in the future to support enabling * and disabling specific interrupts @@ -384,6 +388,7 @@ */ int speed; int duplex; + int port; int pause; int asym_pause; @@ -399,6 +404,14 @@ u32 advertising; u32 lp_advertising; + /* Extended 64-bit support flag. These are added to add ethtool + * support for 2.5GBaseT. Starting from linux 4.14, we may be + * able to discard this, and use phylink support instead. + */ + __ETHTOOL_DECLARE_LINK_MODE_MASK(extended_supported); + __ETHTOOL_DECLARE_LINK_MODE_MASK(extended_advertising); + __ETHTOOL_DECLARE_LINK_MODE_MASK(extended_lp_advertising); + /* Energy efficient ethernet modes which should be prohibited */ u32 eee_broken_modes; @@ -426,6 +439,7 @@ struct net_device *attached_dev; u8 mdix; + u8 mdix_ctrl; void (*adjust_link)(struct net_device *dev); }; @@ -509,6 +523,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); @@ -829,6 +849,7 @@ struct ethtool_link_ksettings *cmd); int phy_ethtool_ksettings_set(struct phy_device *phydev, const struct ethtool_link_ksettings *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);