[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1368559834.4519.23.camel@edumazet-glaptop>
Date: Tue, 14 May 2013 12:30:34 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Fabio Estevam <festevam@...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
On Tue, 2013-05-14 at 16:27 -0300, Fabio Estevam wrote:
> On Mon, May 13, 2013 at 1:57 AM, Shawn Guo <shawn.guo@...aro.org> wrote:
>
> > The patch has landed on 3.10-rc1. Seems that it introduces a lock
> > warning as below. Turn on CONFIG_PROVE_LOCKING and you will be able
> > to see it.
>
> This makes the warning goes away on mx28:
>
> --- a/drivers/net/ethernet/freescale/fec_main.c
> +++ b/drivers/net/ethernet/freescale/fec_main.c
> @@ -451,7 +451,6 @@ fec_restart(struct net_device *ndev, int duplex)
> netif_device_detach(ndev);
> napi_disable(&fep->napi);
> netif_stop_queue(ndev);
> - netif_tx_lock(ndev);
> }
>
> /* Whack a reset. We should wait for this. */
> @@ -619,7 +618,6 @@ fec_restart(struct net_device *ndev, int duplex)
> netif_device_attach(ndev);
> napi_enable(&fep->napi);
> netif_wake_queue(ndev);
> - netif_tx_unlock(ndev);
> }
> }
>
> ,but not sure if it looks OK.
> --
Thats because netif_tx_lock_bh() should be used.
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);
--
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