aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c
diff options
context:
space:
mode:
authorqumingguang <qumingguang@huawei.com>2017-11-02 20:45:22 +0800
committerDavid S. Miller <davem@davemloft.net>2017-11-02 21:28:35 +0900
commitae064e6123f89f90af7e4ea190cc0c612643ca93 (patch)
tree5aaa655a9abd4287b554be24b3bd9d508cc3800c /drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c
parentnet: hns3: Add reset interface implementation in client (diff)
downloadlinux-dev-ae064e6123f89f90af7e4ea190cc0c612643ca93.tar.xz
linux-dev-ae064e6123f89f90af7e4ea190cc0c612643ca93.zip
net: hns3: Fix a misuse to devm_free_irq
we should use free_irq to free the nic irq during the unloading time. because we use request_irq to apply it when nic up. It will crash if up net device after reset the port. This patch fixes the issue. Signed-off-by: qumingguang <qumingguang@huawei.com> Signed-off-by: Lipeng <lipeng321@huawei.com> Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c
index 39679fdb83c7..2a0af11c9b59 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c
@@ -2558,9 +2558,8 @@ static int hns3_nic_uninit_vector_data(struct hns3_nic_priv *priv)
(void)irq_set_affinity_hint(
priv->tqp_vector[i].vector_irq,
NULL);
- devm_free_irq(&pdev->dev,
- priv->tqp_vector[i].vector_irq,
- &priv->tqp_vector[i]);
+ free_irq(priv->tqp_vector[i].vector_irq,
+ &priv->tqp_vector[i]);
}
priv->ring_data[i].ring->irq_init_flag = HNS3_VECTOR_NOT_INITED;