]> 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)
commit52d0cea7139100446d63348b277dcd61a6367fe4
tree5128ddade5060e52ff2b381bae7edc22e7a74fc0
parenteb7bd92e2ce5af25716f9b46312bc7eabe9a30cf
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: 66e2d2466077 ("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