Patchwork [3.9-rc2] net: fec: fix missing napi_disable call

login
register
mail settings
Submitter Georg Hofmann
Date March 14, 2013, 4:54 p.m.
Message ID <1363280049.3967.21.camel@gh-dell>
Download mbox | patch
Permalink /patch/227751/
State Accepted
Delegated to: David Miller
Headers show

Comments

Georg Hofmann - March 14, 2013, 4:54 p.m.
Commit dc975382d2ef36be7e78fac3717927de1a5abcd8 introduces napi support
but never calls napi_disable. This will generate a kernel oops
(kernel BUG at include/linux/netdevice.h:473!) every time, when
ndo_stop is called followed by ndo_start.
Add the missing napi_diable call.

Signed-off-by: Georg Hofmann <georg@hofmannsweb.com>
---
 Tested with a imx28-evk board. 

 drivers/net/ethernet/freescale/fec.c |    1 +
 1 file changed, 1 insertion(+)



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - March 15, 2013, 12:47 p.m.
From: Georg Hofmann <georg@hofmannsweb.com>
Date: Thu, 14 Mar 2013 17:54:09 +0100

> Commit dc975382d2ef36be7e78fac3717927de1a5abcd8 introduces napi support
> but never calls napi_disable. This will generate a kernel oops
> (kernel BUG at include/linux/netdevice.h:473!) every time, when
> ndo_stop is called followed by ndo_start.
> Add the missing napi_diable call.
> 
> Signed-off-by: Georg Hofmann <georg@hofmannsweb.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/net/ethernet/freescale/fec.c b/drivers/net/ethernet/freescale/fec.c
index 069a155..128da16 100644
--- a/drivers/net/ethernet/freescale/fec.c
+++ b/drivers/net/ethernet/freescale/fec.c
@@ -1437,6 +1437,7 @@  fec_enet_close(struct net_device *ndev)
 	struct fec_enet_private *fep = netdev_priv(ndev);
 
 	/* Don't know what to do yet. */
+	napi_disable(&fep->napi);
 	fep->opened = 0;
 	netif_stop_queue(ndev);
 	fec_stop(ndev);