--- zzzz-none-000/linux-4.9.276/include/linux/phy.h 2021-07-20 14:21:16.000000000 +0000 +++ falcon-5530-750/linux-4.9.276/include/linux/phy.h 2023-04-05 08:19:02.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); /* @@ -348,6 +352,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 +390,7 @@ */ int speed; int duplex; + int port; int pause; int asym_pause; @@ -399,6 +406,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,8 +441,13 @@ struct net_device *attached_dev; u8 mdix; + u8 mdix_ctrl; 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 +529,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 +855,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);