Skip to content
Commit 24877687 authored by Song, Yoong Siang's avatar Song, Yoong Siang Committed by Jakub Kicinski
Browse files

net: stmmac: fix CBS idleslope and sendslope calculation

When link speed is not 100 Mbps, port transmit rate and speed divider
are set to 8 and 1000000 respectively. These values are incorrect for
CBS idleslope and sendslope HW values calculation if the link speed is
not 1 Gbps.

This patch adds switch statement to set the values of port transmit rate
and speed divider for 10 Gbps, 5 Gbps, 2.5 Gbps, 1 Gbps, and 100 Mbps.
Note that CBS is not supported at 10 Mbps.

Fixes: bc41a668 ("net: stmmac: tc: Remove the speed dependency")
Fixes: 1f705bc6

 ("net: stmmac: Add support for CBS QDISC")
Signed-off-by: default avatarSong, Yoong Siang <yoong.siang.song@intel.com>
Link: https://lore.kernel.org/r/1613655653-11755-1-git-send-email-yoong.siang.song@intel.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent e5bcf0e8
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment