From: dann frazier <dann.frazier@canonical.com>
To: Aviad Krawczyk <aviad.krawczyk@huawei.com>,
"David S. Miller" <davem@davemloft.net>
Cc: Zhao Chen <zhaochen6@huawei.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] hinic: Link the logical network device to the pci device in sysfs
Date: Mon, 23 Jul 2018 16:55:40 -0600 [thread overview]
Message-ID: <20180723225540.GA6905@xps13.dannf> (raw)
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>
---
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
next reply other threads:[~2018-07-23 22:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-23 22:55 dann frazier [this message]
2018-07-25 21:01 ` [PATCH] hinic: Link the logical network device to the pci device in sysfs David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180723225540.GA6905@xps13.dannf \
--to=dann.frazier@canonical.com \
--cc=aviad.krawczyk@huawei.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=zhaochen6@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).