Message ID | 20181228002040.1256-1-xuechaojing@huawei.com |
---|---|
State | Changes Requested, archived |
Delegated to: | David Miller |
Headers | show |
Series | [1/1] net-next/hinic:add shutdown callback | expand |
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.
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.
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.
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);
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(+)