PHY_INTERFACE_MODE_100BASEX,
 };
 
+static DECLARE_PHY_INTERFACE_MASK(phylink_sfp_interfaces);
+
 static phy_interface_t phylink_choose_sfp_interface(struct phylink *pl,
                                                    const unsigned long *intf)
 {
        else
                mode = MLO_AN_INBAND;
 
+       /* Set the PHY's host supported interfaces */
+       phy_interface_and(phy->host_interfaces, phylink_sfp_interfaces,
+                         pl->config->supported_interfaces);
+
        /* Do the initial configuration */
        ret = phylink_sfp_config_phy(pl, mode, phy);
        if (ret < 0)
 }
 EXPORT_SYMBOL_GPL(phylink_mii_c45_pcs_get_state);
 
+static int __init phylink_init(void)
+{
+       for (int i = 0; i < ARRAY_SIZE(phylink_sfp_interface_preference); ++i)
+               __set_bit(phylink_sfp_interface_preference[i],
+                         phylink_sfp_interfaces);
+
+       return 0;
+}
+
+module_init(phylink_init);
+
 MODULE_LICENSE("GPL v2");
 
  * @advertising: Currently advertised linkmodes
  * @adv_old: Saved advertised while power saving for WoL
  * @lp_advertising: Current link partner advertised linkmodes
+ * @host_interfaces: PHY interface modes supported by host
  * @eee_broken_modes: Energy efficient ethernet modes which should be prohibited
  * @autoneg: Flag autoneg being used
  * @rate_matching: Current rate matching mode
        /* used with phy_speed_down */
        __ETHTOOL_DECLARE_LINK_MODE_MASK(adv_old);
 
+       /* Host supported PHY interface types. Should be ignored if empty. */
+       DECLARE_PHY_INTERFACE_MASK(host_interfaces);
+
        /* Energy efficient ethernet modes which should be prohibited */
        u32 eee_broken_modes;