diff options
author | 2017-10-24 21:02:10 +0800 | |
---|---|---|
committer | 2017-10-26 17:25:35 +0900 | |
commit | 3a46f34d20d453f09defb76b11a567647939c0aa (patch) | |
tree | a66c6542d60d323f1c6918ce8e891eb3e99d55ae /drivers/net/ethernet/hisilicon | |
parent | net: hns3: fix the bug of hns3_set_txbd_baseinfo (diff) | |
download | linux-3a46f34d20d453f09defb76b11a567647939c0aa.tar.gz linux-3a46f34d20d453f09defb76b11a567647939c0aa.tar.bz2 linux-3a46f34d20d453f09defb76b11a567647939c0aa.zip |
net: hns3: add nic_client check when initialize roce base information
Roce driver works base on HNS3 driver.If insmod Roce driver before
NIC driver there is a error because do not check nic_client. This patch
adds nic_client check when initialize roce base information.
Fixes: 46a3df9 (net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support)
Signed-off-by: Lipeng <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon')
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index 443124177f05..2c22d3cf6d1e 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -4285,7 +4285,7 @@ static int hclge_init_client_instance(struct hnae3_client *client, vport->roce.client = client; } - if (hdev->roce_client) { + if (hdev->roce_client && hdev->nic_client) { ret = hclge_init_roce_base_info(vport); if (ret) goto err; |