* [PATCH net-next 1/2] netvsc: fix RCU warning in get_stats
@ 2017-04-14 21:42 Stephen Hemminger
2017-04-14 21:42 ` [PATCH net-next 2/2] hv_netvsc: change netvsc device default duplex to FULL Stephen Hemminger
2017-04-17 19:13 ` [PATCH net-next 1/2] netvsc: fix RCU warning in get_stats David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Stephen Hemminger @ 2017-04-14 21:42 UTC (permalink / raw)
To: davem; +Cc: netdev, Stephen Hemminger
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 <sthemmin@microsoft.com>
---
drivers/net/hyperv/netvsc_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
index f24c2891dd0c..76489a06ef3b 100644
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -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)
--
2.11.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH net-next 2/2] hv_netvsc: change netvsc device default duplex to FULL
2017-04-14 21:42 [PATCH net-next 1/2] netvsc: fix RCU warning in get_stats Stephen Hemminger
@ 2017-04-14 21:42 ` Stephen Hemminger
2017-04-17 19:13 ` [PATCH net-next 1/2] netvsc: fix RCU warning in get_stats David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Stephen Hemminger @ 2017-04-14 21:42 UTC (permalink / raw)
To: davem; +Cc: netdev, Simon Xiao
From: Simon Xiao <sixiao@microsoft.com>
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 <sixiao@microsoft.com>
---
drivers/net/hyperv/netvsc_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
index 76489a06ef3b..fad5a57765b9 100644
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -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,
--
2.11.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next 1/2] netvsc: fix RCU warning in get_stats
2017-04-14 21:42 [PATCH net-next 1/2] netvsc: fix RCU warning in get_stats Stephen Hemminger
2017-04-14 21:42 ` [PATCH net-next 2/2] hv_netvsc: change netvsc device default duplex to FULL Stephen Hemminger
@ 2017-04-17 19:13 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2017-04-17 19:13 UTC (permalink / raw)
To: stephen; +Cc: netdev, sthemmin
Both patches applied but you may want to use more consistent
Subject line subsystem prefixes in the future.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-04-17 19:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-14 21:42 [PATCH net-next 1/2] netvsc: fix RCU warning in get_stats Stephen Hemminger
2017-04-14 21:42 ` [PATCH net-next 2/2] hv_netvsc: change netvsc device default duplex to FULL Stephen Hemminger
2017-04-17 19:13 ` [PATCH net-next 1/2] netvsc: fix RCU warning in get_stats David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.