This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] AM4376:NETDEV 看门狗未复位(步骤2)

Guru**** 2538290 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/979085/am4376-netdev-watchdog-does-not-reset-step-2

器件型号:AM4376

您好!

我们使用了以下补丁、但问题仍然存在:

diff -urwn a/drivers/net/ti/cpsw.c b/drivers/net/ti/cpsw.c
-- a/drivers/net/ethernet/ti/cpsw.c 2020-12-04:50:44.513650500 +0100
++ b/drivers/net/ethernet/ti/cpsw.c 2020-12-10 09:52:25.793384857 +0100
@@-1510、6 +1510、8 @@
   q_idx = q_idx % cpsw->TX_ch_num;
 
  txch = cpsw->txch[q_idx];
+ TxQ = netdev_get_TX_queue (ndev、q_idx);
+
  RET = cpsw_tx_packet_submit (priv, skb,txch);
  如果(不可能(ret!= 0)){
   cpsw_err (priv, tx_err,“desc submit failed\n");
@@-1520、15+1522、26 @@
  *告诉内核停止向我们发送 TX 帧。
  *
  如果(不可能(!cpdma_check_free_tx_desc (txch))){
-  TxQ = netdev_get_TX_queue (ndev、q_idx);
   netif_tx_stop_queue (TxQ);
+   
+/*  边界,以便 STOP_queue 对其他 CPU 可见*/
+  SMP_MB__after_atom();
+
+  IF (cpdma_check_free_tx_desc (txch))
+   netif_TX_WAKE_queue (TxQ);
  }
 
  返回 NETDEV_TX_OK;
 失败:
  ndev->stats.tx_durned++;
- TxQ = netdev_get_tx_queue (ndev、skb_get_queue_mapping (skb));
  netif_tx_stop_queue (TxQ);
+  
+/* 边界,以便 STOP_queue 对其他 CPU 可见*/
+ SMP_MB__after_atom();
+
+ IF (cpdma_check_free_tx_desc (txch))
+  netif_TX_WAKE_queue (TxQ);
+
  返回 NETDEV_TX_BUSY;
 }
 

4小时后我们得到:

1月 1日00:07:26 arm-cortex-A8 user.warn 内核:--- [在此处剪切]-----
1月 1日00:07:26 ARM-cortex-A8 user.warn 内核:警告:CPU:0 PID:4、位于/usr/src/kernel/net/sched/sch_generic.c:316 DEV_Watchdog+0x284/0x288
1月 1日00:07:26 ARM-cortex-A8 user.info 内核:netdev 安全装置:eth1 (cpsw):发送队列0超时
1月 1日00:07:26 arm-cortex-A8 user.warn 内核:链接到的模块:mod_uioru (O) mod_SRAM (O) mod_rtc (O) mod_powerFail (O) mod_pinmux (O) mod_obuart (O) mod_knx (O) mod_iobus (O) mod_omex (o) mod_om_opo (i)
1月 1日00:07:26 arm-cortex-A8 user.warn 内核:CPU:0 PID:4 Comm:ktimersoftD/0被污染:G          O   4.9.178-rt131-4.9.178 #1
1月 1日00:07:26 arm-cortex-A8 user.warn 内核:硬件名称:通用 AM43 (平展器件树)
1月 1日00:07:26 arm-cortex-A8 user.warn 内核:[ ](展开回扫)从[ ](show_stack+0x20/0x24)
1月 1日00:07:26 arm-cortex-A8 user.warn 内核:[ ](show_stack)从[ ](dump_stack+0x24/0x28)
1月 1日00:07:26 arm-cortex-A8 user.warn 内核:[ ](dump_stack)从[ ](_warn+0xf4/0x10c)
1月 1日00:07:26 arm-cortex-A8 user.warn 内核:[ ](__warn)从[ ](WARN_RASPH_FMt+0x48/0x50)
1月 1日00:07:26 arm-cortex-A8 user.warn 内核:[ ](warn_slowpath_fmt)、来自[ ](DEV_WATCHDOG+0x284/0x288)
1月 1日00:07:26 arm-cortex-A8 user.warn 内核:[ ](DEV_Watchdog)从[ ](run_timer_softirq+0x1F4/0x4c4)
1月 1日00:07:26 arm-cortex-A8 user.warn 内核:[ ](run_timer_softirq)、来自[ ](do_curry_softirqs+0x1e0/0x3cc)
1月 1日00:07:26 arm-cortex-A8 user.warn 内核:[ ](do _curry_softirq)、从[ ](run_ksoftirqd+0x3c/0x60)
1月 1日00:07:26 arm-cortex-A8 user.warn 内核:[ ](run_ksoftirqd)、来自[ ](smpboot_thread_fn+0x1d0/0x2e4)
1月 1日00:07:26 arm-cortex-A8 user.warn 内核:[ ](smpboot_thread_fn)、来自[ ](kthread+0x110/0x118)
1月 1日00:07:26 arm-cortex-A8 user.warn 内核:[ ](kthread)、来自[ ](RET_FANK_F叉+0x14/0x3c)
1月 1日00:07:26 arm-cortex-A8 user.warn 内核:--[结束跟踪0000000000000002 ]--

此致

Walter

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

    我将与开发团队核实其他建议。

    对于其他人、背景参考是此 e2e 帖子。 内核版本为4.9.178-rt131

    此致、

    Schuyler

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

    在打印此警告后,接口是否断开或停止工作? 您能否描述正在处理的流量以及处理器上的应用程序负载?

    此致、

    Schuyler

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

    看门狗发生后、接口永远不会返回。
    之所以发生 WD  、是因为以太网 IRQ 线程是非 RT 主线程(SCHED_OTHER、0)、因此 TX 队列可以满运行。
    然而、这个安全装置应该复位网络接口而不是禁用它。

    最好的 Redards

    Walter。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

    与开发人员的讨论表明 ,此修补 程序应该已经解决了接口关闭问题。 此修补程序在上一个主题中引用过,应用此修补程序是否存在问题?  

    此致、

    Schuyler

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

    非常感谢您的提示。

    现在、我应用了这两个补丁。

    此致

    Walter。