`-| 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_MAST...
`-| 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_start_aneg(priv->phydev); }return0; } 开发者ID:AsadRaza,项目名称:OCTEON-Linux,代码行数:32,代码来源:ethernet-mdio.c 示例2: fs_init_phy ▲点赞 7▼ staticintfs_init_phy(struct net_device *dev){structfs_enet_private*fep=netdev_priv(dev);structphy_device*phydev;u32 flags = fep-...
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...
err = phy_start_aneg(phydev); //开始自动配置 if (err < 0) phy_error(phydev); schedule_delayed_work(&phydev->state_queue, PHY_STATE_TIME * HZ); } 3.运行ifconfig eth0 up命令的过程 进入分支状态机分支 case PHY_UP: //开启(ifconfig eth0 up) ...
cpsw_ale_control_set(priv->ale, slave_port, ALE_PORT_STATE, ALE_PORT_STATE_DISABLE); } if (mac_control != slave->mac_control) { phy_print_status(phy); // 当状态不同时,需要写寄存器时,才打印网络状态 __raw_writel(mac_control, &slave->sliver->mac_control); ...
phy_start_aneg(struct phy_device *phydev); int phy_aneg_done(struct phy_device *phydev); int phy_speed_down(struct phy_device *phydev, bool sync); int phy_speed_up(struct phy_device *phydev); bool phy_check_valid(int speed
||---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_BUS...
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); ...
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...