]>
Commit | Line | Data |
---|---|---|
fa6bf050 GKH |
1 | From c4b6a2eaf1c14810a4803d658f68614365978738 Mon Sep 17 00:00:00 2001 |
2 | From: Haiyang Zhang <haiyangz@microsoft.com> | |
3 | Date: Thu, 1 Sep 2011 12:19:42 -0700 | |
4 | Subject: staging: hv: fix a kernel warning in netvsc_linkstatus_callback() | |
5 | ||
6 | From: Haiyang Zhang <haiyangz@microsoft.com> | |
7 | ||
8 | commit c4b6a2eaf1c14810a4803d658f68614365978738 upstream. | |
9 | ||
10 | netif_notify_peers() caused a kernel warning in netvsc_linkstatus_callback(), | |
11 | because netvsc_linkstatus_callback() is within IRQ context. So we move | |
12 | the first call to netif_notify_peers() into queued work as well, but with | |
13 | zero delay. | |
14 | ||
15 | In addition to "staging-next", this should also be back-ported to stable | |
16 | kernels 2.6.32 and later. | |
17 | ||
18 | Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> | |
19 | Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> | |
20 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | |
21 | ||
22 | --- | |
23 | drivers/staging/hv/netvsc_drv.c | 2 +- | |
24 | 1 file changed, 1 insertion(+), 1 deletion(-) | |
25 | ||
26 | --- a/drivers/staging/hv/netvsc_drv.c | |
27 | +++ b/drivers/staging/hv/netvsc_drv.c | |
28 | @@ -217,8 +217,8 @@ void netvsc_linkstatus_callback(struct h | |
29 | if (status == 1) { | |
30 | netif_carrier_on(net); | |
31 | netif_wake_queue(net); | |
32 | - netif_notify_peers(net); | |
33 | ndev_ctx = netdev_priv(net); | |
34 | + schedule_delayed_work(&ndev_ctx->dwork, 0); | |
35 | schedule_delayed_work(&ndev_ctx->dwork, msecs_to_jiffies(20)); | |
36 | } else { | |
37 | netif_carrier_off(net); |