netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] net-next/hinic:add shutdown callback
@ 2018-12-28  0:20 Xue Chaojing
  2018-12-29  5:49 ` David Miller
  0 siblings, 1 reply; 6+ messages in thread
From: Xue Chaojing @ 2018-12-28  0:20 UTC (permalink / raw)
  To: davem
  Cc: linux-kernel, xuechaojing, netdev, wulike1, chiqijun, fy.wang,
	tony.qu, luoshaokai

This patch add shutdown callback for hinic.

Signed-off-by: Xue Chaojing <xuechaojing@huawei.com>
---
 drivers/net/ethernet/huawei/hinic/hinic_main.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/ethernet/huawei/hinic/hinic_main.c b/drivers/net/ethernet/huawei/hinic/hinic_main.c
index 6d48dc62a44b..76ca8a518dca 100644
--- a/drivers/net/ethernet/huawei/hinic/hinic_main.c
+++ b/drivers/net/ethernet/huawei/hinic/hinic_main.c
@@ -1106,6 +1106,13 @@ static void hinic_remove(struct pci_dev *pdev)
 	dev_info(&pdev->dev, "HiNIC driver - removed\n");
 }
 
+static void hinic_shutdown(struct pci_dev *pdev)
+{
+	pci_disable_device(pdev);
+
+	dev_info(&pdev->dev, "HiNIC driver - shutdown\n");
+}
+
 static const struct pci_device_id hinic_pci_table[] = {
 	{ PCI_VDEVICE(HUAWEI, HINIC_DEV_ID_QUAD_PORT_25GE), 0},
 	{ PCI_VDEVICE(HUAWEI, HINIC_DEV_ID_DUAL_PORT_25GE), 0},
@@ -1119,6 +1126,7 @@ static struct pci_driver hinic_driver = {
 	.id_table       = hinic_pci_table,
 	.probe          = hinic_probe,
 	.remove         = hinic_remove,
+	.shutdown       = hinic_shutdown,
 };
 
 module_pci_driver(hinic_driver);
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] net-next/hinic:add shutdown callback
  2018-12-28  0:20 [PATCH 1/1] net-next/hinic:add shutdown callback Xue Chaojing
@ 2018-12-29  5:49 ` David Miller
  2018-12-29  9:20   ` 答复: " xuechaojing
  0 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2018-12-29  5:49 UTC (permalink / raw)
  To: xuechaojing
  Cc: linux-kernel, netdev, wulike1, chiqijun, fy.wang, tony.qu,
	luoshaokai

From: Xue Chaojing <xuechaojing@huawei.com>
Date: Fri, 28 Dec 2018 00:20:40 +0000

> @@ -1106,6 +1106,13 @@ static void hinic_remove(struct pci_dev *pdev)
>  	dev_info(&pdev->dev, "HiNIC driver - removed\n");
>  }
>  
> +static void hinic_shutdown(struct pci_dev *pdev)
> +{
> +	pci_disable_device(pdev);
> +
> +	dev_info(&pdev->dev, "HiNIC driver - shutdown\n");
> +}

I do not think these messages are appropriate.  I didn't catch
them before, but I'm not going to let new ones get added.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* 答复: [PATCH 1/1] net-next/hinic:add shutdown callback
  2018-12-29  5:49 ` David Miller
@ 2018-12-29  9:20   ` xuechaojing
  2018-12-29 16:41     ` David Miller
  0 siblings, 1 reply; 6+ messages in thread
From: xuechaojing @ 2018-12-29  9:20 UTC (permalink / raw)
  To: David Miller
  Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, wulike (A),
	chiqijun, Wangfengying, Quhuichun (Tony), Luoshaokai (luoshaokai)

[-- Attachment #1: Type: text/plain, Size: 1135 bytes --]

HI:

Sorry, I didn't explain this patch clearly.
if there is no shutdown callback, our board will report pcie UNF errors after restarting.
Attached is our log.

Xuechaojing
-----邮件原件-----
发件人: David Miller [mailto:davem@davemloft.net] 
发送时间: 2018年12月29日 13:49
收件人: xuechaojing <xuechaojing@huawei.com>
抄送: linux-kernel@vger.kernel.org; netdev@vger.kernel.org; wulike (A) <wulike1@huawei.com>; chiqijun <chiqijun@huawei.com>; Wangfengying <fy.wang@huawei.com>; Quhuichun (Tony) <tony.qu@huawei.com>; Luoshaokai (luoshaokai) <luoshaokai@huawei.com>
主题: Re: [PATCH 1/1] net-next/hinic:add shutdown callback

From: Xue Chaojing <xuechaojing@huawei.com>
Date: Fri, 28 Dec 2018 00:20:40 +0000

> @@ -1106,6 +1106,13 @@ static void hinic_remove(struct pci_dev *pdev)
>  	dev_info(&pdev->dev, "HiNIC driver - removed\n");  }
>  
> +static void hinic_shutdown(struct pci_dev *pdev) {
> +	pci_disable_device(pdev);
> +
> +	dev_info(&pdev->dev, "HiNIC driver - shutdown\n"); }

I do not think these messages are appropriate.  I didn't catch them before, but I'm not going to let new ones get added.

[-- Attachment #2: 20180731041827typescript-reboot --]
[-- Type: application/octet-stream, Size: 292061 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 答复: [PATCH 1/1] net-next/hinic:add shutdown callback
  2018-12-29  9:20   ` 答复: " xuechaojing
@ 2018-12-29 16:41     ` David Miller
  0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2018-12-29 16:41 UTC (permalink / raw)
  To: xuechaojing
  Cc: linux-kernel, netdev, wulike1, chiqijun, fy.wang, tony.qu,
	luoshaokai

From: xuechaojing <xuechaojing@huawei.com>
Date: Sat, 29 Dec 2018 09:20:54 +0000

> Sorry, I didn't explain this patch clearly.
> if there is no shutdown callback, our board will report pcie UNF errors after restarting.
> Attached is our log.

I want you to remove the "dev_info()" call from your patch because it is
inappropriate.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/1] net-next/hinic:add shutdown callback
@ 2019-01-01 19:39 Xue Chaojing
  2019-01-02 18:13 ` David Miller
  0 siblings, 1 reply; 6+ messages in thread
From: Xue Chaojing @ 2019-01-01 19:39 UTC (permalink / raw)
  To: davem
  Cc: linux-kernel, xuechaojing, netdev, wulike1, chiqijun, fy.wang,
	tony.qu, luoshaokai

If there is no shutdown callback, our board will report pcie UNF errors
after restarting. This patch add shutdown callback for hinic.

Signed-off-by: Xue Chaojing <xuechaojing@huawei.com>
---
 drivers/net/ethernet/huawei/hinic/hinic_main.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/ethernet/huawei/hinic/hinic_main.c b/drivers/net/ethernet/huawei/hinic/hinic_main.c
index 6d48dc62a44b..da323b9e1f62 100644
--- a/drivers/net/ethernet/huawei/hinic/hinic_main.c
+++ b/drivers/net/ethernet/huawei/hinic/hinic_main.c
@@ -1106,6 +1106,11 @@ static void hinic_remove(struct pci_dev *pdev)
 	dev_info(&pdev->dev, "HiNIC driver - removed\n");
 }
 
+static void hinic_shutdown(struct pci_dev *pdev)
+{
+	pci_disable_device(pdev);
+}
+
 static const struct pci_device_id hinic_pci_table[] = {
 	{ PCI_VDEVICE(HUAWEI, HINIC_DEV_ID_QUAD_PORT_25GE), 0},
 	{ PCI_VDEVICE(HUAWEI, HINIC_DEV_ID_DUAL_PORT_25GE), 0},
@@ -1119,6 +1124,7 @@ static struct pci_driver hinic_driver = {
 	.id_table       = hinic_pci_table,
 	.probe          = hinic_probe,
 	.remove         = hinic_remove,
+	.shutdown       = hinic_shutdown,
 };
 
 module_pci_driver(hinic_driver);
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] net-next/hinic:add shutdown callback
  2019-01-01 19:39 Xue Chaojing
@ 2019-01-02 18:13 ` David Miller
  0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2019-01-02 18:13 UTC (permalink / raw)
  To: xuechaojing
  Cc: linux-kernel, netdev, wulike1, chiqijun, fy.wang, tony.qu,
	luoshaokai

From: Xue Chaojing <xuechaojing@huawei.com>
Date: Tue, 1 Jan 2019 19:39:33 +0000

> If there is no shutdown callback, our board will report pcie UNF errors
> after restarting. This patch add shutdown callback for hinic.
> 
> Signed-off-by: Xue Chaojing <xuechaojing@huawei.com>

Applied, thanks.

 

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-01-02 18:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-28  0:20 [PATCH 1/1] net-next/hinic:add shutdown callback Xue Chaojing
2018-12-29  5:49 ` David Miller
2018-12-29  9:20   ` 答复: " xuechaojing
2018-12-29 16:41     ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2019-01-01 19:39 Xue Chaojing
2019-01-02 18:13 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).