`-| phy_start_aneg() `-| phy_config_aneg() `-| genphy_config_aneg() `-| __genphy_config_aneg() `-| genphy_setup_master_slave()// (1) 如果是千兆网口,配置其 master/slave `-| { | phy_modify_changed(phydev, MII_CTRL1000,// 配置 mdio 0x09 寄存器 | (CTL1000_ENABLE_MASTER ...
phy_state_machine() `-| phy_start_aneg() `-| phy_config_aneg() `-| genphy_config_aneg() `-| __genphy_config_aneg() `-| genphy_setup_master_slave() // (1) 如果是千兆网口,配置其 master/slave `-| { | phy_modify_changed(phydev, MII_CTRL1000, // 配置 mdio 0x09 寄存器 |...
||---bus->reset=mdiobb_reset---|/|ctrl->ops->set_mdio_data| ||---bus->priv=ctrl<--- | ctrl->ops->get_mdio_data| | |---fs_mii_bitbang_init//设置用来模拟mdc和mdio的管脚资源 ||---of_address_to_resource(np,0,&res)//转换设备树地址并作为资源返回,设备树中指定 || ||---snp...
int phy_start_aneg(struct phy_device *phydev) { int err; mutex_lock(&phydev->lock); if (AUTONEG_DISABLE == phydev->autoneg) phy_sanitize_settings(phydev); err = phydev->drv->config_aneg(phydev); //调用驱动的config_aneg方法,默认是genphy_config_aneg if (err < 0) goto out_unloc...
(0~31)int speed;// 速度int duplex;// 双工模式int pause;// 停止int asym_pause;int link;u32 interrupts;// 中断使能标志u32 supported;u32 advertising;u32 lp_advertising;int autoneg;int link_timeout;int irq;// 中断号void*priv;// 私有数据struct work_struct phy_queue;// PHY工作队列struct...
void*priv;// 私有数据 structwork_structphy_queue;// PHY工作队列 structdelayed_workstate_queue;// PHY延时工作队列 atomic_tirq_disable; structmutexlock; structnet_device*attached_dev;// 网络设备 void(*adjust_link)(struct net_device *dev); ...
| |--- bus->priv = ctrl <--- | ctrl->ops->get_mdio_data | | |--- fs_mii_bitbang_init//设置用来模拟mdc和mdio的管脚资源 | |--- of_address_to_resource(np,0, &res)//转换设备树地址并作为资源返回,设备树中指定 | | | |---snprintf(bus->id, MII...
cpsw_ndo_open->cpsw_slave_open -> PHY_UP -> phy_start_aneg -> genphy_config_aneg -> genphy_config_advert -> genphy_restart_aneg -> PHY_AN -> PHY_NOLINK(串口打印Down) -> phy_aneg_done -> PHY_RUNNING(串口打印Up) 注:在AN后出现NOLINK状态,我猜是因为自动协商需要时间,此时间大于1...
void phy_start (struct phy_device *phydev) void phy_stop (struct phy_device *phydev) int phy_start_aneg (struct phy_device *phydev) int phy_stop_interrupts (struct phy_device *phydev) int genphy_restart_aneg (struct phy_device *phydev) int genphy_config_aneg (struct phy_device *ph...
2539 - return PTR_ERR_OR_ZERO(priv->hwmon_dev); 2612 + if (ops->config) 2613 + err = ops->config(phydev); 2614 + 2615 + return err; 2540 2616 } 2541 2617 2542 2618 static const struct marvell_hwmon_ops m88e1121_hwmon_ops = { @@ -2554,6 +2630,14 @@ static ...