1. 官方介绍

stmmac which is the official driver for Synopsys Ethernet QoS 10/100/1000 and QoS

IP  in Linux. The cstmmac driver was originally developed by STMicroelectronics, one of Synopsys

Ethernet IP customers, supporting MAC 10/100/1000. The source code for cstmmac driver can

be found in Linux Kernel under the folder cdrivers/net/ethernet/stmicro/stmmac

As an open source project, the driver started receiving new features and bug fixes and started

being adopted by other Synopsys Ethernet IP clients. Finally, in 2016 the QoS IP support was

added to the driver.

The stmmac driver has an architecture that increases hardware/IP abstraction as we go up through the layers.

Starting from the bottom layer, each IP has its isolated ecosystem consisting of a core (MAC

related operations), DMA (DMA related operations), DESCS (descriptor related operations) and

common libs blocks. In the case of MAC 10/100 and MAC 1000, they share the same lib file,

because they have a set of common registers and operations.

The stmmac driver supports two types of socket buffers: ring and chain. Each implementation

is done in ring_mode and chain_mode files. For the common MAC Management Counters

(MMC) operations, the driver has the mmc_core file that includes all the necessary operations

for this purpose.

The middle layer is the common layer for all the IPs. Based on configuration, this layer will

choose the IP block to use. The main file is stmmac_main where the programmer can find the

typical Ethernet driver functions like *_open(), *_xmit() and other relevant ones.

stmmac_main is the maestro of stmmac , picking each block operations (MDIO, PTP,

Ethtool and IP functions) and putting them in a common operational flow.

The upper layer is composed by stmmac_platform and stmmac_pci files. The platform

related file contains a wide set of device tree parsing functions serving as a common device tree

interpreter for all specific-platform drivers (top layer). The PCI related file is an end-use glue

driver, to be used when this type of bus is needed.

In the top layer we can find a generic driver and a set of custom platform glue drivers that

implement operations related to a certain SoC. All these drivers typically use Release dwc_enet_qos_software_5.10a

stmmac_platform device tree parsing features and then call stmmac_main methods to

follow the normal flow.

In order to add support for Ethernet QoS 5.xx IP Cores a new file was introduced ( dwmac5 )

which implements all the relevant configuration and handling of 5.xx features. For TSN

functions stmmac_tsn was introduced, serving as interface with the TSN subsystem.

2. driver path

linux-linaro-stable-lsk/drivers/net/ethernet/stmicro/stmmac

3. dwmac5

kernel4.14只支持dwmac-4.1,kernel 4.17开始支持dwmac-5.10,即eqos5.1,具体如下:

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/drivers/net/ethernet/stmicro?id=8bf993a5877e8a0a2f6338085f2dee7c23f524a3

dwmac ethernet driver(stmmac)相关推荐

  1. 为荔枝派Zero制作Linux系统镜像[转]

    最近购入了一块LicheePi Zero开发板,使用全志V3s作为主控芯片.本文介绍如何从零开始为荔枝派制作一个可以启动的Linux系统镜像. 配置编译环境 本文所有编译工作均基于Ubuntu 20. ...

  2. dwmac/stmmac/eqos 远程唤醒(WOL) 驱动

    1. ethtool linux-4.19.125\drivers\net\ethernet\stmicro\stmmac\stmmac_ethtool.c 1.1 ethtool eth0 etht ...

  3. MTK Read/Write Ethernet Mac Addrees from Kernel NvRAM Patch

    在Kernel Ethernet Driver中读nvram , 更新以太网Mac 地址. add Read and Write Ethernet Mac Addrees from NVRAMSign ...

  4. dm9000 driver 1

    资料 dm9000-中文 dm9000--ae make menuconfig Device Drivers  ---> [*] Network device support  ---> ...

  5. WINCE Driver 心得总结

    一. Windows CE的驱动程序的区分 1.从加载以及接口方式来区分 可以分为本机设备驱动(Built-In Driver).可加载驱动(Loadable Driver)以及混合型驱动. (1)本 ...

  6. ESP32 单片机学习笔记 - 06 - (以太网)Ethernet转Wifi

    ESP32 单片机学习笔记 - 06 - (以太网)Ethernet转Wifi 暂停了半个多月的学习,去调车了.现在课设开始了,赶紧回来把一开始的"以太网"目标学完.但是却发现,好 ...

  7. 车载以太网基础篇之Eth Driver

    车载以太网基础篇之Ethernet Driver 前言 首先,请问大家几个小小问题,你清楚: 你知道Eth Driver模块的主要作用是什么吗? EthDriver与以太网控制器,以太网收发器,都有哪 ...

  8. 【A113】网卡芯片Realtek RTL8201驱动调试

    前言: 这一篇是对自己调试的一个过程记录,代码看的算是比较熟悉了,过程中一直没调过,没后询问原厂FAE,修改了一下dts一个地址参数,就可以了,最终没有太多成就感,修改了PHY芯片的一个状态寄存器.. ...

  9. Linux stmac网卡代码分析----probe

    probe 主要分析一下驱动的主要框架,必要地方细致分析下 文件位置: drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c 从文件的最后看起: modul ...

最新文章

  1. android:onClick attribute
  2. Java RandomAccessFile close()方法与示例
  3. ElasticSearch之高亮显示
  4. Facebook WhatsApp开放「数据下载」;iPhone需求疲软引发恐慌;今日头条「更名」| CSDN 极客头条...
  5. kubernetes集群架构和组件
  6. Python字典集合数据结构深入理解
  7. 扫一扫二维码隐私权政策
  8. 智能识别系统设计---图像特征提取
  9. PAT乙级真题1093 || 字符串A+B(详解,C/C++示例,测试点分析)
  10. GPIOA高8位输入控制低8位输出(位运算)
  11. alt复制选区就会卡 ps_ps怎么把选区复制出来
  12. 【论文】Saliency Detection: A Spectral Residual Approach阅读笔记
  13. iphone连电脑服务器未响应,今天要闻iphone8无限转圈黑屏强制关机没反应(苹果电脑开不了机黑屏)...
  14. android手机分辨率适配,Android屏幕适配(一)
  15. M1芯片的Mac上iPhone虚拟机滚动过快的问题
  16. 人脸识别篇---人脸对齐
  17. 二分查找算法(递归+非递归)
  18. 概念:COW与MOR
  19. 【飞行器】基于matlab四旋翼飞行器PID控制仿真【含Matlab源码 1277期】
  20. 2011中国移动互联网发展痛点调查

热门文章

  1. 【第五单元】vim与文件管理(10.1)
  2. SaeStorage使用示例
  3. 运维从业人员是否需要考证?
  4. grub引导iso光盘[可用于ntfs]
  5. oracle presentation = ro,设置sqlplus访问远程oracle数据库的方法
  6. mysql 选择插入语句_带有last_insert_id()的Mysql多行插入 – 选择语句
  7. python docx 合并文档 图片_Python+pymupdf处理PDF文档案例6则
  8. php编译自己库文件,php编译后追加库模块-gd库
  9. python怎么让输出的数字右对齐_python(格式化输出)
  10. 全国计算机二级vb得分技巧,全国计算机等级考试二级VB笔试各题型答题技巧(2)...