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.

[FAQ] [参考译文] [常见问题解答] TDA4VM:如何在 SDK 8.6及更低版本的本机 Linux 驱动程序中修复 CPSW 端口8上的通信故障。

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

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1455743/faq-tda4vm-how-to-fix-the-communication-failure-on-cpsw-port-8-in-native-linux-driver-on-sdk-version-8-6-and-below

器件型号:TDA4VM

工具与软件:

在 SDK 8.6及更低版本中使用本机 Linux 驱动程序时、CPSW 端口8上的以太网通信无法成功进行。

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

    由于 ALE 丢弃哪个端口8接收数据、ALE GET 字段和 SET 字段屏蔽端口8信息出现问题。

    CPSW ALE 具有75位 ALE 条目、存储在三个32位字中。 使用 cpsw_ale_get_field()/cpsw_ale_set_field()进行读/写时、函数假定该字段
    将被严格包含在一个字中。 这种 情况并非如此、ALE 字段条目最多可涵盖两个字。

    例如: VLAN 条目在 word2、word3中有未标记的文件。

    以下修复将添加对跨两个字的读取/写入 ALE 字段的支持。

    修复:
    文件名: drivers/net/ti/cpsw_ale.c

    补丁:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    From 0badc8f20da335c699895cb92353e10f9f6dc109 Mon Sep 17 00:00:00 2001
    From: Tanmay Patil <t-patil@ti.com>
    Date: Mon, 24 Apr 2023 14:28:24 +0530
    Subject: [PATCH] net: ethernet: ti: cpsw_ale: Fix ale field set and get
    CPSW ALE has 75 bit ALE entries which is are stored in 3
    32 bit words. With Read/Write using cpsw_ale_get_field()/
    cpsw_ale_set_field(), the function assumes that the field
    will be strictly contained within one word. This is not
    the case and ALE field entries can span upto two words.
    This commit adds the support for reading/writing ALE
    fields which span two words.
    Signed-off-by: Tanmay Patil <t-patil@ti.com>
    ---
    drivers/net/ethernet/ti/cpsw_ale.c | 22 +++++++++++++++++-----
    1 file changed, 17 insertions(+), 5 deletions(-)
    diff --git a/drivers/net/ethernet/ti/cpsw_ale.c b/drivers/net/ethernet/ti/cpsw_ale.c
    index 6d60373d15e0..dc8d6f8e7dda 100644
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX



    注意:
    上述问题 在 TI SDK 9.0及更高版本中解决、仅在 SDK 8.6及更低版本中存在。