net: hns3: remove unnecessary ring configuration operation while resetting
authorHuazhong Tan <tanhuazhong@huawei.com>
Mon, 16 Jul 2018 15:36:24 +0000 (16:36 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Jul 2018 18:16:44 +0000 (11:16 -0700)
The configuration of the ring will be used to reinitialize the
ring after the hardware reset is completed. So we should not
release and reacquire this configuration during reset.

Fixes: bb6b94a896d4 ("net: hns3: Add reset interface implementation in client")
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c

index 829644665aa865514f7afd25631996d337830d2f..24f82b774d7e1fc92c938a1319742ba6b31403aa 100644 (file)
@@ -3436,10 +3436,6 @@ static int hns3_reset_notify_init_enet(struct hnae3_handle *handle)
        /* Carrier off reporting is important to ethtool even BEFORE open */
        netif_carrier_off(netdev);
 
-       ret = hns3_get_ring_config(priv);
-       if (ret)
-               return ret;
-
        ret = hns3_nic_init_vector_data(priv);
        if (ret)
                return ret;
@@ -3471,10 +3467,6 @@ static int hns3_reset_notify_uninit_enet(struct hnae3_handle *handle)
        if (ret)
                netdev_err(netdev, "uninit ring error\n");
 
-       hns3_put_ring_config(priv);
-
-       priv->ring_data = NULL;
-
        hns3_uninit_mac_addr(netdev);
 
        return ret;