Skip to content

Commit 53fe3ed

Browse files
Xue Chaojingdavem330
authored andcommitted
net-next/hinic:add shutdown callback
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent e888402 commit 53fe3ed

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/net/ethernet/huawei/hinic/hinic_main.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,6 +1106,11 @@ static void hinic_remove(struct pci_dev *pdev)
11061106
dev_info(&pdev->dev, "HiNIC driver - removed\n");
11071107
}
11081108

1109+
static void hinic_shutdown(struct pci_dev *pdev)
1110+
{
1111+
pci_disable_device(pdev);
1112+
}
1113+
11091114
static const struct pci_device_id hinic_pci_table[] = {
11101115
{ PCI_VDEVICE(HUAWEI, HINIC_DEV_ID_QUAD_PORT_25GE), 0},
11111116
{ PCI_VDEVICE(HUAWEI, HINIC_DEV_ID_DUAL_PORT_25GE), 0},
@@ -1119,6 +1124,7 @@ static struct pci_driver hinic_driver = {
11191124
.id_table = hinic_pci_table,
11201125
.probe = hinic_probe,
11211126
.remove = hinic_remove,
1127+
.shutdown = hinic_shutdown,
11221128
};
11231129

11241130
module_pci_driver(hinic_driver);

0 commit comments

Comments
 (0)