return err;
}
-static struct phy_driver *generic_for_interface(phy_interface_t interface)
+static struct phy_driver *generic_for_phy(struct phy_device *phydev)
{
#ifdef CONFIG_PHYLIB_10G
- if (is_10g_interface(interface))
+ if (phydev->is_c45)
return &gen10g_driver;
#endif
}
/* If we made it here, there's no driver for this PHY */
- return generic_for_interface(interface);
+ return generic_for_phy(phydev);
}
struct phy_device *phy_device_create(struct mii_dev *bus, int addr,
#ifdef CONFIG_PHYLIB_10G
/* If it's 10G, we need to issue reset through one of the MMDs */
- if (is_10g_interface(phydev->interface)) {
+ if (phydev->is_c45) {
if (!phydev->mmds)
gen10g_discover_mmds(phydev);
#ifdef CONFIG_PHYLIB_10G
extern struct phy_driver gen10g_driver;
-
-/*
- * List all 10G interfaces here, the assumption being that PHYs on these
- * interfaces are C45
- */
-static inline int is_10g_interface(phy_interface_t interface)
-{
- return interface == PHY_INTERFACE_MODE_XGMII ||
- interface == PHY_INTERFACE_MODE_USXGMII ||
- interface == PHY_INTERFACE_MODE_10GBASER;
-}
-
#endif
/**