diff options
author | Stephen Hemminger <stephen@networkplumber.org> | 2017-09-06 13:53:06 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-09-11 14:21:30 -0700 |
commit | 8f2bb1de73344dbedd4195016b782bee7bf3598f (patch) | |
tree | 8bbc1c2d115869ad53882621fb220adb5e917023 | |
parent | 8195b1396ec86dddbba443c74b2188b423556c74 (diff) | |
download | linux-stable-8f2bb1de73344dbedd4195016b782bee7bf3598f.tar.gz linux-stable-8f2bb1de73344dbedd4195016b782bee7bf3598f.tar.bz2 linux-stable-8f2bb1de73344dbedd4195016b782bee7bf3598f.zip |
hv_netvsc: avoid unnecessary wakeups on subchannel creation
Only need to wakeup the initiator after all sub-channels
are opened.
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/hyperv/rndis_filter.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/hyperv/rndis_filter.c b/drivers/net/hyperv/rndis_filter.c index 731bc7cc6f43..065b204d8e17 100644 --- a/drivers/net/hyperv/rndis_filter.c +++ b/drivers/net/hyperv/rndis_filter.c @@ -1048,8 +1048,8 @@ static void netvsc_sc_open(struct vmbus_channel *new_sc) else netdev_notice(ndev, "sub channel open failed: %d\n", ret); - atomic_inc(&nvscdev->open_chn); - wake_up(&nvscdev->subchan_open); + if (atomic_inc_return(&nvscdev->open_chn) == nvscdev->num_chn) + wake_up(&nvscdev->subchan_open); } /* Open sub-channels after completing the handling of the device probe. |