[PATCH] hinic: Link the logical network device to the pci device in sysfs

Subsystems: huawei ethernet driver, networking drivers, the rest

STALE2943d

2 messages, 2 authors, 2018-07-25 · open the first message on its own page

[PATCH] hinic: Link the logical network device to the pci device in sysfs

From: dann frazier <hidden>
Date: 2018-07-23 22:55:45

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 <redacted>
---
 drivers/net/ethernet/huawei/hinic/hinic_main.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/huawei/hinic/hinic_main.c b/drivers/net/ethernet/huawei/hinic/hinic_main.c
index 5b122728dcb47..09e9da10b7865 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");
-- 
2.18.0

Re: [PATCH] hinic: Link the logical network device to the pci device in sysfs

From: David Miller <davem@davemloft.net>
Date: 2018-07-25 21:02:06

From: dann frazier <redacted>
Date: Mon, 23 Jul 2018 16:55:40 -0600
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 <redacted>
Applied, thank you.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help