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)
commit12a3670887725df364cc3e030cf3bede6f13b364
tree5128ddade5060e52ff2b381bae7edc22e7a74fc0
parent71b215f36dca1a3d5d1c576b2099e6d7ea03047e
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: 88d10bd6f730 ("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