Firefly Open Source Community

Title: ethernet flow control support [Print This Page]

Author: v.vacek    Time: 4/3/2019 14:13
Title: ethernet flow control support
Is there possibility to switch on flow control on ethernet interface? Now is the ethernet PHY layer chip RTL8211E set after hw reset to default without flow control announcement. There is no activated control driver in the Linux kernel to set it. Thanks. Vaclav.
Author: penguin    Time: 4/4/2019 17:22
In drivers/net/ethernet/stmicro/stmmac/stmmac_main.c , there is a flow control module parameter.

  1. static int flow_ctrl = FLOW_OFF;                                                                                                                  
  2. module_param(flow_ctrl, int, S_IRUGO | S_IWUSR);                                                                                                   
  3. MODULE_PARM_DESC(flow_ctrl, "Flow control ability [on/off]");                                                                                      
Copy the code


It defaults to FLOW_OFF. You can modify it and recompile the kernel to check if it works.
Author: penguin    Time: 4/4/2019 17:28
Or follow the commands below to have a hot fix:

  1. cd /sys/bus/platform/drivers/rk_gmac-dwmac

  2. # unbind the ethernet device from the driver
  3. echo fe300000.ethernet > unbind

  4. # turn on flow_ctrl
  5. echo 1 > /sys/module/stmmac/parameters/flow_ctrl

  6. # bind the ethernet device back
  7. echo fe300000.ethernet > bind
Copy the code


After these commands, there're messages from the kernel:

  1. [11547.465973] force_sf_dma_mode is ignored if force_thresh_dma_mode is set.[11547.466691] rk_gmac-dwmac fe300000.ethernet: Looking up phy-supply from device tree
  2. [11547.467826] rk_gmac-dwmac fe300000.ethernet: clock input or output? (input).
  3. [11547.468510] rk_gmac-dwmac fe300000.ethernet: TX delay(0x28).
  4. [11547.469033] rk_gmac-dwmac fe300000.ethernet: RX delay(0x1b).
  5. [11547.469635] rk_gmac-dwmac fe300000.ethernet: integrated PHY? (no).
  6. [11547.470722] rk_gmac-dwmac fe300000.ethernet: cannot get clock clk_mac_speed
  7. [11547.471349] rk_gmac-dwmac fe300000.ethernet: clock input from PHY
  8. [11547.476958] rk_gmac-dwmac fe300000.ethernet: init for RGMII
  9. [11547.486003] stmmac - user ID: 0x10, Synopsys ID: 0x35
  10. [11547.486561]  Ring mode enabled
  11. [11547.486844]  DMA HW capability register supported
  12. [11547.487250]  Normal descriptors
  13. [11547.487688]  RX Checksum Offload Engine supported (type 2)
  14. [11547.488177]  Wake-Up On Lan supported
  15. [11547.488617]  Enable RX Mitigation via HW Watchdog Timer
  16. [11547.491855] of_get_named_gpiod_flags: parsed 'snps,reset-gpio' property of node '/ethernet@fe300000[0]' - status (0)
  17. [11547.492826] gpio-111 (mdio-reset): gpiod_request: status -16
  18. [11547.509629] libphy: stmmac: probed
  19. [11547.509949] eth%d: PHY ID 001cc915 at 0 IRQ POLL (stmmac-0:00) active
  20. [11547.510616] eth%d: PHY ID 001cc915 at 1 IRQ POLL (stmmac-0:01)
  21. root@firefly:/sys/bus/platform/drivers/rk_gmac-dwmac# [11547.615421] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

  22. root@firefly:/sys/bus/platform/drivers/rk_gmac-dwmac# [11550.624270] rk_gmac-dwmac fe300000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
Copy the code


The last line is indicating flow control enabled, right?  Plz check
Author: v.vacek    Time: 5/13/2019 20:10
penguin Posted at 4/4/2019 17:28
Or follow the commands below to have a hot fix:

It doesn't work. The stmmac driver uses kernel generic-phy driver for PHY layer chip /RTL8211E/ and this driver has flow control advertisement switched off.
                                                                                                Vaclav.
Author: seanpar505    Time: 1/9/2026 01:28
Thank you for your article, it¨s truly overwhelming! The Reliable study questions NetSec-Pro free questions are crucial for your promotion and salary raise!now available for free!
Author: maxking279    Time: 1/15/2026 14:00
I love the content, so it¨s an instant like for me. Free AZ-204 Books PDF resources available. Best of luck to all!
Author: stevewh617    Time: 2/5/2026 12:46
いつもあなたに恷互のCDCS-001J協YにvBするY歌深を嚥えられるために、ShikenPASSは械に}鹿の|を個鋲し、ずっと恷仟のYのシラバスに鬉犬}鹿を厚仟しています。F壓の偏では、ShikenPASSはあなたの恷もよいxkです。Lいgにわたって、ShikenPASSは謹くの鞭Y伏にJ辛されました。暴を佚じていないなら、巓りの繁?にいてみてもいいです。ShikenPASSのY}鹿を旋喘したことがある繁がきっといますから。ShikenPASSは恷倔なYCDCS-001歌深を戻工してあなたをYに栽鯉させることを隠^します。




Welcome Firefly Open Source Community (https://bbs.t-firefly.com/) Powered by Discuz! X3.1