Commit e1afc099 authored by Haiyang Zhang's avatar Haiyang Zhang Committed by Greg Kroah-Hartman

staging: hv: fix a kernel warning in netvsc_linkstatus_callback()

commit c4b6a2ea upstream.

netif_notify_peers() caused a kernel warning in netvsc_linkstatus_callback(),
because netvsc_linkstatus_callback() is within IRQ context. So we move
the first call to netif_notify_peers() into queued work as well, but with
zero delay.

In addition to "staging-next", this should also be back-ported to stable
kernels 2.6.32 and later.
Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 2ef6c996
...@@ -217,8 +217,8 @@ void netvsc_linkstatus_callback(struct hv_device *device_obj, ...@@ -217,8 +217,8 @@ void netvsc_linkstatus_callback(struct hv_device *device_obj,
if (status == 1) { if (status == 1) {
netif_carrier_on(net); netif_carrier_on(net);
netif_wake_queue(net); netif_wake_queue(net);
netif_notify_peers(net);
ndev_ctx = netdev_priv(net); ndev_ctx = netdev_priv(net);
schedule_delayed_work(&ndev_ctx->dwork, 0);
schedule_delayed_work(&ndev_ctx->dwork, msecs_to_jiffies(20)); schedule_delayed_work(&ndev_ctx->dwork, msecs_to_jiffies(20));
} else { } else {
netif_carrier_off(net); netif_carrier_off(net);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment