Skip to contentSkip to conversation

hinic: Link the logical network device to the pci device in sysfs

PATCH Applied dann frazier 2 participants 2 messages Jul 23, 2018 – Jul 25, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/net/ethernet/huawei/hinic/hinic_main.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/huawei/hinic/hinic_main.c +1 -0
index 5b122728dcb47..09e9da10b7865 100644
@@ -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");
Signature · 1 line
2.18.0
maintainer Applied
#1 lore raw

From: dann frazier <[email protected]>
Date: Mon, 23 Jul 2018 16:55:40 -0600

Quoted 5 lines

Otherwise interfaces get exposed under /sys/devices/virtual, which doesn't give udev the context it needs for PCI-based predictable interface names.

Applied, thank you.