[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOMZO5DK6giehS9HpmXMzRKiDvvtEPLxvyenMQaBdrWS8WWVxw@mail.gmail.com>
Date: Tue, 14 May 2013 16:40:32 -0300
From: Fabio Estevam <festevam@...il.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: Shawn Guo <shawn.guo@...aro.org>,
Frank Li <Frank.Li@...escale.com>, romieu@...zoreil.com,
r.schwebel@...gutronix.de, davem@...emloft.net,
l.stach@...gutronix.de, netdev@...r.kernel.org, lznuaa@...il.com
Subject: Re: [PATCH v5 1/1 net] net: fec: fix kernel oops when plug/unplug
cable many times
Hi Eric,
On Tue, May 14, 2013 at 4:30 PM, Eric Dumazet <eric.dumazet@...il.com> wrote:
> Thats because netif_tx_lock_bh() should be used.
Thanks for your advise.
> And btw, the order of the unlocks should probably be reversed :
>
> netif_tx_unlock_bh(ndev);
> netif_wake_queue(ndev);
> napi_enable(&fep->napi);
> netif_device_attach(ndev);
I tried the change below and do not see the original warning on mx28:
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -451,7 +451,7 @@ fec_restart(struct net_device *ndev, int duplex)
netif_device_detach(ndev);
napi_disable(&fep->napi);
netif_stop_queue(ndev);
- netif_tx_lock(ndev);
+ netif_tx_lock_bh(ndev);
}
/* Whack a reset. We should wait for this. */
@@ -616,10 +616,10 @@ fec_restart(struct net_device *ndev, int duplex)
writel(FEC_DEFAULT_IMASK, fep->hwp + FEC_IMASK);
if (netif_running(ndev)) {
- netif_device_attach(ndev);
- napi_enable(&fep->napi);
+ netif_tx_unlock_bh(ndev);
netif_wake_queue(ndev);
- netif_tx_unlock(ndev);
+ napi_enable(&fep->napi);
+ netif_device_attach(ndev);
}
}
Could someone try it on mx6, please?
If it works I can submit the patch tomorrow.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists