net: hns3: enable DCB when TC num is one and pfc_en is non-zero
authorYunsheng Lin <linyunsheng@huawei.com>
Fri, 28 Jun 2019 11:50:08 +0000 (19:50 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 28 Jun 2019 16:39:49 +0000 (09:39 -0700)
commitae179b2f05189844616ce629ec1e644ad52f35fd
tree1fabd56e81b665c42dc1630cc8ae50acf6698df4
parentf96315f2f17e7b2580d2fec7c4d6a706a131d904
net: hns3: enable DCB when TC num is one and pfc_en is non-zero

Currently when TC num is one, the DCB will be disabled no matter if
pfc_en is non-zero or not.

This patch enables the DCB if pfc_en is non-zero, even when TC num
is one.

Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Peng Li <lipeng321@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
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.h