hinic: Link the logical network device to the pci device in sysfs
[ Upstream commit 7856e8616273098dc6c09a6e084afd98a283ff0d ] 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> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
d00c34f8e2
commit
2dd2f77225
@ -981,6 +981,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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user