]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: Fix initialization when cmd is not supported
authorYunsheng Lin <linyunsheng@huawei.com>
Wed, 20 Sep 2017 10:52:51 +0000 (18:52 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 20 Sep 2017 23:15:39 +0000 (16:15 -0700)
commite301a4fefef2781545041f769a64f63ce0c2557d
tree2b2f04ee94725f0d38e82a375ac4a511ddc8e7ca
parentdd93e7604151a50f7cc56434287259cd2021c301
net: hns3: Fix initialization when cmd is not supported

When ae_dev doesn't support DCB, rx_priv_wl_config,
common_thrd_config and tm_qs_bp_cfg can't be called, otherwise
cmd return fail, which causes the hclge module initialization
process to fail.
This patch fix it by adding a DCB capability flag to check if
the ae_dev support DCB.

Fixes: 22c0e2ce21dd ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support")
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hnae3.h
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c