netvsc: fix RCU warning in get_stats
Subsystems (3)
PATCH 1/2 netvsc: fix RCU warning in get_stats
The statistics functionis called with RTNL held during probe but with RCU held during access from /proc and elsewhere. This is safe so update the lockdep annotation.
Signed-off-by Stephen Hemminger <[email protected]>
--- drivers/net/hyperv/netvsc_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/hyperv/netvsc_drv.c +1 -1
@@ -897,7 +897,7 @@ static void netvsc_get_stats64(struct net_device *net, struct rtnl_link_stats64 *t) {struct net_device_context *ndev_ctx =netdev_priv (net); -struct netvsc_device *nvdev =rcu_dereference (ndev_ctx->nvdev); +struct netvsc_device *nvdev =rcu_dereference_rtnl (ndev_ctx->nvdev);int i;if (!nvdev)
Signature · 1 line
2.11.0
PATCH 2/2 hv_netvsc: change netvsc device default duplex to FULL
From: Simon Xiao <[email protected]>
The netvsc device supports full duplex by default. This warnings in log from bonding device which did not like seeing UNKNOWN duplex.
Signed-off-by Simon Xiao <[email protected]>
--- drivers/net/hyperv/netvsc_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/hyperv/netvsc_drv.c +1 -1
@@ -815,7 +815,7 @@ static void netvsc_init_settings(struct net_device *dev)struct net_device_context *ndc =netdev_priv (dev); ndc->speed =SPEED_UNKNOWN ; - ndc->duplex =DUPLEX_UNKNOWN ; + ndc->duplex =DUPLEX_FULL ; } static int netvsc_get_link_ksettings(struct net_device *dev,
Signature · 1 line
2.11.0
David Miller
maintainerBoth patches applied but you may want to use more consistent Subject line subsystem prefixes in the future.