diff options
author | Lipeng <lipeng321@huawei.com> | 2017-10-24 16:02:10 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-12-20 12:10:32 +0300 |
commit | 1d9205558e50b7af5fe5b054bf26f93c9255786e (patch) | |
tree | d17d7dca88bf44e20e4dcffb02a904d9bb64b098 /drivers/net/ethernet/hisilicon/hns3 | |
parent | 0949f8afa8f1b9d6ebce48606e41dfcdafbaca4a (diff) | |
download | linux-1d9205558e50b7af5fe5b054bf26f93c9255786e.tar.xz |
net: hns3: add nic_client check when initialize roce base information
[ Upstream commit 3a46f34d20d453f09defb76b11a567647939c0aa ]
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>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns3')
-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 1df84a874d95..a0ef97e7f3c9 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -3981,7 +3981,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; |