]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: fix tm port shapping of fibre port is incorrect after driver initialization
authorGuangbin Huang <huangguangbin2@huawei.com>
Sat, 11 Jun 2022 12:25:29 +0000 (20:25 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 13 Jun 2022 10:56:01 +0000 (11:56 +0100)
commit5e973fa2b86f9eff84b2221d254d28c3a03788f3
tree5128ddade5060e52ff2b381bae7edc22e7a74fc0
parenta082d145f990b64062000ed5076b86a997284bc8
net: hns3: fix tm port shapping of fibre port is incorrect after driver initialization

Currently in driver initialization process, driver will set shapping
parameters of tm port to default speed read from firmware. However, the
speed of SFP module may not be default speed, so shapping parameters of
tm port may be incorrect.

To fix this problem, driver sets new shapping parameters for tm port
after getting exact speed of SFP module in this case.

Fixes: 59b0d93afd6c ("net: hns3: add support for multiple media type")
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.h