> What do you think on the following code? > > struct dsa_port *dp = dsa_to_port(dev->ds, port); > struct phy_device *phy_dev = dp->slave->phydev; > . > . > . > > if (!phydev || phy_driver_is_genphy(phydev)) { > /*Add RGMII internal delay*/ > } phy_driver_is_genphy(phydev) is probably a bad idea. If you get a delay depends on if they driver is available? I would prefer you assume the PHY can do delays. So you only need to consider when the MII port is used for connecting to the CPU. So make use of dsa_is_cpu_port(). Andrew