]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
UBUNTU: SAUCE: {topost} net: hns3: Use roce handle when calling roce callback function
authorWei Hu (Xavier) <xavier.huwei@huawei.com>
Sat, 5 May 2018 09:25:39 +0000 (17:25 +0800)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 6 Jun 2018 18:42:13 +0000 (14:42 -0400)
BugLink: https://bugs.launchpad.net/bugs/1768670
This patch replaces nic handle with roce handle when calling
roce callback function when link status change.

Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c

index 1e0f5b62b830f6b3314c61974def55e8c679a941..1036d1f293ecfe597f8811d7f264a9f9ebfc2e43 100644 (file)
@@ -2373,6 +2373,7 @@ static void hclge_update_link_status(struct hclge_dev *hdev)
 {
        struct hnae3_client *rclient = hdev->roce_client;
        struct hnae3_client *client = hdev->nic_client;
+       struct hnae3_handle *rhandle;
        struct hnae3_handle *handle;
        int state;
        int i;
@@ -2384,8 +2385,10 @@ static void hclge_update_link_status(struct hclge_dev *hdev)
                for (i = 0; i < hdev->num_vmdq_vport + 1; i++) {
                        handle = &hdev->vport[i].nic;
                        client->ops->link_status_change(handle, state);
+                       rhandle = &hdev->vport[i].roce;
                        if (rclient && rclient->ops->link_status_change)
-                               rclient->ops->link_status_change(handle, state);
+                               rclient->ops->link_status_change(rhandle,
+                                                                state);
                }
                hdev->hw.mac.link = state;
        }
index b508cde90fc08499d754a965a593f2f70ec50885..640226294b47cbf7530ce1f9276353c1098bf24d 100644 (file)
@@ -294,6 +294,7 @@ static void hclgevf_request_link_info(struct hclgevf_dev *hdev)
 
 void hclgevf_update_link_status(struct hclgevf_dev *hdev, int link_state)
 {
+       struct hnae3_handle *rhandle = &hdev->roce;
        struct hnae3_handle *handle = &hdev->nic;
        struct hnae3_client *rclient;
        struct hnae3_client *client;
@@ -304,7 +305,7 @@ void hclgevf_update_link_status(struct hclgevf_dev *hdev, int link_state)
        if (link_state != hdev->hw.mac.link) {
                client->ops->link_status_change(handle, !!link_state);
                if (rclient && rclient->ops->link_status_change)
-                       rclient->ops->link_status_change(handle, !!link_state);
+                       rclient->ops->link_status_change(rhandle, !!link_state);
                hdev->hw.mac.link = link_state;
        }
 }