]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: fix ETS bandwidth validation bug
authorYonglong Liu <liuyonglong@huawei.com>
Thu, 14 Nov 2019 02:32:41 +0000 (10:32 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 15 Nov 2019 02:06:34 +0000 (18:06 -0800)
commitd19bff0a3218c2bf2a27572ebb145174d8306a26
treefac16923ce2e29f0c470f0213ab8544450f6f36d
parentbbad90c935092bf26de92beeed55db6399c91c80
net: hns3: fix ETS bandwidth validation bug

Some device only support 4 TCs, but the driver check the total
bandwidth of 8 TCs, so may cause wrong configurations write to
the hw.

This patch uses hdev->tc_max to instead HNAE3_MAX_TC to fix it.

Fixes: 2d3f40c23def ("net: hns3: add common validation in hclge_dcb")
Signed-off-by: Yonglong Liu <liuyonglong@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c