aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/hyperv/hyperv_net.h
diff options
context:
space:
mode:
authorstephen hemminger <[email protected]>2017-03-22 21:51:02 +0000
committerDavid S. Miller <[email protected]>2017-03-23 02:38:56 +0000
commit43c7bd1ffcd1621c64cedf1be52156e2f95bba9b (patch)
treec2102c18cbeb22c0abadece9a602a6ad73bc06ae /drivers/net/hyperv/hyperv_net.h
parentnetvsc: uses RCU instead of removal flag (diff)
downloadkernel-43c7bd1ffcd1621c64cedf1be52156e2f95bba9b.tar.gz
kernel-43c7bd1ffcd1621c64cedf1be52156e2f95bba9b.zip
netvsc: use refcount_t for keeping track of sub channels
Rather than a lock and variable, use a refcount_t to keep track of the number of sub channels. Don't need to wait for subchannels on device removal since wait was already done in device_add. Also fix the error handling; don't wait forever in case of an error on request to create sub channels. Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'drivers/net/hyperv/hyperv_net.h')
-rw-r--r--drivers/net/hyperv/hyperv_net.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h
index 907f55960ba8..4747ad48b3cc 100644
--- a/drivers/net/hyperv/hyperv_net.h
+++ b/drivers/net/hyperv/hyperv_net.h
@@ -761,8 +761,8 @@ struct netvsc_device {
u32 max_chn;
u32 num_chn;
- spinlock_t sc_lock; /* Protects num_sc_offered variable */
- u32 num_sc_offered;
+
+ refcount_t sc_offered;
/* Holds rndis device info */
void *extension;