diff options
author | Jason Gunthorpe <jgg@mellanox.com> | 2018-09-05 18:21:22 -0400 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2018-09-05 18:21:22 -0400 |
commit | 2c910cb75e1fe6de52d95c8e32caedd1629a33a5 (patch) | |
tree | 94a0eea6f8cde689d11e7583ddd0a930b8785ab4 /drivers/net/hyperv | |
parent | 627212c9d49ba2759b699450f5d8f45f73e062fa (diff) | |
parent | b53b1c08a23eb1091982daacb2122f90a7094a77 (diff) |
Merge branch 'uverbs_dev_cleanups' into rdma.git for-next
For dependencies, branch based on rdma.git 'for-rc' of
https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git/
Pull 'uverbs_dev_cleanups' from Leon Romanovsky:
====================
Reuse the char device code interfaces to simplify ib_uverbs_device
creation and destruction. As part of this series, we are sending fix to
cleanup path, which was discovered during internal review,
The fix definitely can go to -rc, but it means that this series will be
dependent on rdma-rc.
====================
* branch 'uverbs_dev_cleanups':
RDMA/uverbs: Use device.groups to initialize device attributes
RDMA/uverbs: Use cdev_device_add() instead of cdev_add()
RDMA/core: Depend on device_add() to add device attributes
RDMA/uverbs: Fix error cleanup path of ib_uverbs_add_one()
Resolved conflict in ib_device_unregister_sysfs()
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/net/hyperv')
-rw-r--r-- | drivers/net/hyperv/netvsc_drv.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index 507f68190cb1..1121a1ec407c 100644 --- a/drivers/net/hyperv/netvsc_drv.c +++ b/drivers/net/hyperv/netvsc_drv.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/netdevice.h> | 29 | #include <linux/netdevice.h> |
30 | #include <linux/inetdevice.h> | 30 | #include <linux/inetdevice.h> |
31 | #include <linux/etherdevice.h> | 31 | #include <linux/etherdevice.h> |
32 | #include <linux/pci.h> | ||
32 | #include <linux/skbuff.h> | 33 | #include <linux/skbuff.h> |
33 | #include <linux/if_vlan.h> | 34 | #include <linux/if_vlan.h> |
34 | #include <linux/in.h> | 35 | #include <linux/in.h> |
@@ -2039,12 +2040,16 @@ static int netvsc_register_vf(struct net_device *vf_netdev) | |||
2039 | { | 2040 | { |
2040 | struct net_device *ndev; | 2041 | struct net_device *ndev; |
2041 | struct net_device_context *net_device_ctx; | 2042 | struct net_device_context *net_device_ctx; |
2043 | struct device *pdev = vf_netdev->dev.parent; | ||
2042 | struct netvsc_device *netvsc_dev; | 2044 | struct netvsc_device *netvsc_dev; |
2043 | int ret; | 2045 | int ret; |
2044 | 2046 | ||
2045 | if (vf_netdev->addr_len != ETH_ALEN) | 2047 | if (vf_netdev->addr_len != ETH_ALEN) |
2046 | return NOTIFY_DONE; | 2048 | return NOTIFY_DONE; |
2047 | 2049 | ||
2050 | if (!pdev || !dev_is_pci(pdev) || dev_is_pf(pdev)) | ||
2051 | return NOTIFY_DONE; | ||
2052 | |||
2048 | /* | 2053 | /* |
2049 | * We will use the MAC address to locate the synthetic interface to | 2054 | * We will use the MAC address to locate the synthetic interface to |
2050 | * associate with the VF interface. If we don't find a matching | 2055 | * associate with the VF interface. If we don't find a matching |