summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/huawei
diff options
context:
space:
mode:
authordann frazier <dann.frazier@canonical.com>2018-07-23 16:55:40 -0600
committerDavid S. Miller <davem@davemloft.net>2018-07-25 13:54:52 -0700
commit7856e8616273098dc6c09a6e084afd98a283ff0d (patch)
tree4ed75daa741d416e62564992614e6d3de70fd908 /drivers/net/ethernet/huawei
parentecbc42ca5d665e9238a4cdb595024d2e6cf87f2d (diff)
downloadlwn-7856e8616273098dc6c09a6e084afd98a283ff0d.tar.gz
lwn-7856e8616273098dc6c09a6e084afd98a283ff0d.zip
hinic: Link the logical network device to the pci device in sysfs
Otherwise interfaces get exposed under /sys/devices/virtual, which doesn't give udev the context it needs for PCI-based predictable interface names. Signed-off-by: dann frazier <dann.frazier@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/huawei')
-rw-r--r--drivers/net/ethernet/huawei/hinic/hinic_main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/huawei/hinic/hinic_main.c b/drivers/net/ethernet/huawei/hinic/hinic_main.c
index 5b122728dcb4..09e9da10b786 100644
--- a/drivers/net/ethernet/huawei/hinic/hinic_main.c
+++ b/drivers/net/ethernet/huawei/hinic/hinic_main.c
@@ -983,6 +983,7 @@ static int nic_dev_init(struct pci_dev *pdev)
hinic_hwdev_cb_register(nic_dev->hwdev, HINIC_MGMT_MSG_CMD_LINK_STATUS,
nic_dev, link_status_event_handler);
+ SET_NETDEV_DEV(netdev, &pdev->dev);
err = register_netdev(netdev);
if (err) {
dev_err(&pdev->dev, "Failed to register netdev\n");