Subject: Re: [BUG] in skge.c on 2.6.18-rc5

From: "Edgar E. Iglesias" <[email-masked]>
Date: Thu, 31 Aug 2006 10:48:28 +0200

On Wed, Aug 30, 2006 at 07:36:56PM +0200, Thibaut VARENE wrote:
> On 8/30/06, Stephen Hemminger <[email-masked]> wrote:
> >On Wed, 30 Aug 2006 19:21:20 +0200
> >"Thibaut VARENE" <[email-masked]> wrote:
> >
> >> Replying to myself as I've been pointed at Stephen's reply (please CC
> >> me, i'm not subscribed):
> >>
> >> I'm bringing the interface up with 'dhclient eth0', and yes it's using 
> >autoneg.
> >>
> >
> >Any chance of getting a backtrace; serial port, digital camera, 
> >handwritten note?
> 
> If you can deal with this extremely blurry shot:
> http://www.pateam.org/archive/tmp/IMGP0825.JPG
> 
> begins with "mod_timer" / "neigh_update" / "read_lock" and so on.
> 
> Worst case I'll reproduce the bug again and dump a better bt, but I'd
> rather avoid as much as possible as I use that machine a lot right now
> ;P

Hi,

It may be safer to disable pollers for the entire down procedure. I think
we might also have races where xmitters are active while we are in
skge_down. Taking the txlock around netif_stop_queue probably doens't help
as a txirq can hit just after and wakeup the queue. Dont know if the 
xmitters while in skge_down will cause problems though.

I have no skge hw so I am pretty much in the dark, cannot test anything,
sorry.

Best regards
-- 
        Programmer
        Edgar E. Iglesias <[email-masked]> 46.46.272.1946

Subject: [PATCH] disable pollers while stopping hw, not just around rx_clean.
Signed-off-by: Edgar E. Iglesias <[email-masked]>

diff --git a/drivers/net/skge.c b/drivers/net/skge.c
index ad878df..cd8c1e4 100644
--- a/drivers/net/skge.c
+++ b/drivers/net/skge.c
@@ -2236,6 +2236,7 @@ static int skge_down(struct net_device *
 	if (netif_msg_ifdown(skge))
 		printk(KERN_INFO PFX "%s: disabling interface\n", dev->name);
 
+	netif_poll_disable(dev);
 	netif_stop_queue(dev);
 
 	skge_write8(skge->hw, SK_REG(skge->port, LNK_LED_REG), LED_OFF);
@@ -2280,7 +2281,6 @@ static int skge_down(struct net_device *
 
 	skge_led(skge, LED_MODE_OFF);
 
-	netif_poll_disable(dev);
 	skge_tx_clean(skge);
 	skge_rx_clean(skge);