All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lipeng <lipeng321@huawei.com>
To: <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linuxarm@huawei.com>, <salil.mehta@huawei.com>,
	<lipeng321@huawei.com>
Subject: [PATCH V2 net-next 8/9] net: hns3: Fix a misuse to devm_free_irq
Date: Thu, 2 Nov 2017 20:45:22 +0800	[thread overview]
Message-ID: <1509626723-18619-9-git-send-email-lipeng321@huawei.com> (raw)
In-Reply-To: <1509626723-18619-1-git-send-email-lipeng321@huawei.com>

From: qumingguang <qumingguang@huawei.com>

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>
---
 drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c | 5 ++---
 1 file 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 39679fd..2a0af11 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;
-- 
1.9.1

  parent reply	other threads:[~2017-11-02 12:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-02 12:45 [PATCH V2 net-next 0/9] net: hns3: add support for reset Lipeng
2017-11-02 12:29 ` David Miller
2017-11-02 12:45 ` [PATCH V2 net-next 1/9] net: hns3: Refactor the mapping of tqp to vport Lipeng
2017-11-02 12:45 ` [PATCH V2 net-next 2/9] net: hns3: Refactor mac_init function Lipeng
2017-11-02 12:45 ` [PATCH V2 net-next 3/9] net: hns3: Refactor the initialization of command queue Lipeng
2017-11-02 12:45 ` [PATCH V2 net-next 4/9] net: hns3: Add support for misc interrupt Lipeng
2017-11-02 12:45 ` [PATCH V2 net-next 5/9] net: hns3: Add reset process in hclge_main Lipeng
2017-11-02 12:45 ` [PATCH V2 net-next 6/9] net: hns3: Add timeout process in hns3_enet Lipeng
2017-11-02 12:45 ` [PATCH V2 net-next 7/9] net: hns3: Add reset interface implementation in client Lipeng
2017-11-02 12:45 ` Lipeng [this message]
2017-11-02 12:45 ` [PATCH V2 net-next 9/9] net: hns3: hns3:fix a bug about statistic counter in reset process Lipeng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1509626723-18619-9-git-send-email-lipeng321@huawei.com \
    --to=lipeng321@huawei.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=salil.mehta@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.