sky2: Shut off interrupts before NAPI
authorMike McCormack <mikem@ring3k.org>
Thu, 13 May 2010 06:12:50 +0000 (06:12 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 14 May 2010 10:06:21 +0000 (03:06 -0700)
Interrupts should be masked, then synchronized, and
finally NAPI should be disabled.

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/sky2.c

index efc31e93eb785c12caae7991848a1c0af9bb0734..f13a45f1db68ca4c96366ff9453b95113f9e1c5c 100644 (file)
@@ -3320,10 +3320,10 @@ static void sky2_restart(struct work_struct *work)
 
        rtnl_lock();
 
-       napi_disable(&hw->napi);
-       synchronize_irq(hw->pdev->irq);
        imask = sky2_read32(hw, B0_IMSK);
        sky2_write32(hw, B0_IMSK, 0);
+       synchronize_irq(hw->pdev->irq);
+       napi_disable(&hw->napi);
 
        for (i = 0; i < hw->ports; i++) {
                struct net_device *dev = hw->dev[i];