当前位置: 首页 > 知识库问答 >
问题:

从挂起状态恢复后,以太网无法工作(S2RAM)

许博
2023-03-14

我正在研究以太网AVB模块。我的板可以被命令暂停

echo mem > /sys/power/state

但是当从挂起恢复时,eth0不起作用。现象是:

>

  • 可平环回: $ ping 127.0.0.1 --

    PHY电源关闭(关机)

    无法ping邻居:$ping 192.168.1.1--

    我假设网络层(符合OSI模型)是可以的,因为我可以ping回环。我认为问题发生在物理层,与:

    >

  • PHY ic(我的板使用Micrel Phys ksz9031)

    MDIO总线

    最后是phy_dev

    也许问题可能发生在以太网控制器上(我的情况是以太网AVB)

    以上是PM平台的工作方式。

    更多详情:

    PHY状态机状态:

    DOWN: PHY device and driver are not ready for anything.  probe() should be called if and only if the PHY is in this state, given that the PHY device exists.
     - PHY driver probe function will, depending on the PHY, set the state to STARTING or READY
    
    STARTING:  PHY device is coming up, and the ethernet driver is not ready.  PHY drivers may set this in the probe function.  If they do, they are responsible for making sure the state is eventually set to indicate whether the PHY is UP or READY, depending on the state when the PHY is done starting up.
     - PHY driver will set the state to READY
     - start will set the state to PENDING
    
    READY: PHY is ready to send and receive packets, but the controller is not.  By default, PHYs which do not implement probe will be set to this state by phy_probe().  If the PHY driver knows the PHY is ready, and the PHY state is STARTING, then it sets this STATE.
         - start will set the state to UP
    PENDING: PHY device is coming up, but the ethernet driver is ready.  phy_start will set this state if the PHY state is STARTING.
     - PHY driver will set the state to UP when the PHY is ready
    
    UP: The PHY and attached device are ready to do work. Interrupts should be started here.
     - timer moves to AN
    
    AN: The PHY is currently negotiating the link state.  Link is therefore down for now.  phy_timer will set this state when it detects the state is UP.  config_aneg will set this state whenever called with phydev->autoneg set to AUTONEG_ENABLE.
    - If autonegotiation finishes, but there's no link, it sets the state to NOLINK.
    - If aneg finishes with link, it sets the state to RUNNING, and calls adjust_link
    - If autonegotiation did not finish after an arbitrary amount of time, autonegotiation should be tried again if the PHY supports "magic" autonegotiation (back to AN)
    - If it didn't finish, and no magic_aneg, move to FORCING.
    
    NOLINK: PHY is up, but not currently plugged in.
    - If the timer notes that the link comes back, we move to RUNNING
    - config_aneg moves to AN
    - phy_stop moves to HALTED
    
    FORCING: PHY is being configured with forced settings
    - if link is up, move to RUNNING
    - If link is down, we drop to the next highest setting, and retry (FORCING) after a timeout
    - phy_stop moves to HALTED
    
    RUNNING: PHY is currently up, running, and possibly sending and/or receiving packets
    - timer will set CHANGELINK if we're polling (this ensures the link state is polled every other cycle of this state machine, which makes it every other second)
    - irq will set CHANGELINK
    - config_aneg will set AN
    - phy_stop moves to HALTED
    
    CHANGELINK: PHY experienced a change in link state
    - timer moves to RUNNING if link
    - timer moves to NOLINK if the link is down
    - phy_stop moves to HALTED
    
    HALTED: PHY is up, but no polling or interrupts are done. Or PHY is in an error state.
    - phy_start moves to RESUMING
    
    RESUMING: PHY was halted, but now wants to run again.
    - If we are forcing, or aneg is done, timer moves to RUNNING
    - If aneg is not done, timer moves to AN
    - phy_stop moves to HALTED
    

    我提出一些假设/假设:

    >

  • 挂起后,系统将进入“已停止”状态,但无法更改为“正在运行”状态。

    由于某种原因,系统进入“关闭”状态,并且无法再次移动到“就绪”状态和“启动”。

    感谢任何帮助。

  • 共有1个答案

    秦雅逸
    2023-03-14

    至少在从挂起状态恢复以解决问题的过程中保持以下状态。

    o启用AVB-DMAC模式寄存器,与高速外设总线时钟一起工作(AVB-DMAC模块目前使用gPTP时钟从队列中读取/写入数据(尽力而为和网络控制)。

    o恢复URAM中的描述符基地址表(DBAT寄存器)。

    o为尽力而为队列và网络控制队列启用中断

    o重新初始化DMAC vàE-MAC设备

    o初始化PTP时钟驱动器,为DMAC提供时钟

    o启用所有队列的传输,以允许上层传输帧,但不会重新开始传输。

    o重新启动PHY设备

    o将设备标记为已从系统连接,并在需要时重新启动。

     类似资料:
    • 我使用Apache Flink 1.9和标准检查点/保存点机制来FS。 我的问题是:如果作业的代码发生了更改,从保存点恢复作业的正确方法是什么?例如,在重构之后,我重命名了几个类,之后我无法从旧的检查点恢复。 我丢失了我的数据,想问-在这种情况下我能做些什么? 所有运算符都有uid和name

    • 问题内容: 我已经困扰了几天以了解这个问题。基本上我有一个加载网站的网站,第一页是登录名,登录后显示内容。 每个用户验证都是通过其自身的网站进行的。因此,例如,没有要保存的内容。我只在这种情况下使用网址。 所以在杀死我的应用程序后,onCreate,webview不会恢复被杀死之前的状态。 我想这是因为saveinstancestate变为null,并且在应用被终止后再次加载了url。 我有会话c

    • 我们正在开发一个运行在AndroidICS 4.0.4和3.0.35内核上的设备。我们面临的问题是设备电源管理和网络可达性。一旦设备从挂起模式启动,它就无法ping任何IP地址,比如8.8.8.8立即。有时需要一分钟或两分钟,有时它变得无法访问,告诉缓冲区空间不可用/目标无法访问。但是如果我们从外部ping这个设备ip,它正在响应,并且从设备端也开始从8.8.8.8获得ping回复,这种行为的原因

    • 我有一份flink的工作,它使用Kafka的数据,制作一些无状态平面图,并向Kafka生成数据,这是一份工作量非常小的工作。 例如,在作业需要从检查点还原之前,它通常会无问题地获取检查点,而它只是无法使用下面的堆栈跟踪还原状态。 状态非常小,我相信它只是Kafka偏移量,它至少运行了一次语义。 所有操作员都有。uid()集,我完全没有主意了。 这是尝试从检查点重新启动时的错误: 任务管理器在正常操

    • 我正在寻找关于如何正确使用Kubernetes本地存储PVC的帮助。 我们在Ubuntu上提供了一个kubespray集群,并启用了本地存储提供器。 我们做错了什么?

    • 在绘画的时候,经常会有这种情况,本来正在用绿色笔画,突然需要用红色笔画几笔,但画完了之后又要换成绿色笔。如果是在现实中作画,可以把笔蘸上不同的墨水,画了之后又蘸上之前的墨水,或者准备几只笔,要用哪只就选哪只。 在Canvas中也可以这样,不过Canvas中的画笔永远只有一只。所以,如果要更换画笔的颜色,就需要保存和恢复状态。状态其实就是画布当前属性的一个快照,包括: 图形的属性值,如strokeS