--- zzzz-none-000/linux-4.9.231/include/linux/phy.h 2020-07-22 07:10:54.000000000 +0000 +++ falcon-5590-729/linux-4.9.231/include/linux/phy.h 2022-03-30 12:03:35.000000000 +0000 @@ -28,6 +28,8 @@ #include +struct macsec_ops; + #define PHY_DEFAULT_FEATURES (SUPPORTED_Autoneg | \ SUPPORTED_TP | \ SUPPORTED_MII) @@ -162,6 +164,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); /* @@ -399,6 +403,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; @@ -428,6 +440,10 @@ u8 mdix; void (*adjust_link)(struct net_device *dev); + +#if IS_ENABLED(CONFIG_MACSEC_HW_OFFLOAD) + const struct macsec_ops *macsec_ops; +#endif }; #define to_phy_device(d) container_of(to_mdio_device(d), \ struct phy_device, mdio) @@ -509,6 +525,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 +851,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);