]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/gianfar.c
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
[linux-2.6-omap-h63xx.git] / drivers / net / gianfar.c
index b8394cf134e8a458ee24169d53e2da58ba142efe..999d69168277f7190bb2d4e0367ea56a5ba473d8 100644 (file)
@@ -134,9 +134,7 @@ static int gfar_process_frame(struct net_device *dev, struct sk_buff *skb, int l
 static void gfar_vlan_rx_register(struct net_device *netdev,
                                struct vlan_group *grp);
 void gfar_halt(struct net_device *dev);
-#ifdef CONFIG_PM
 static void gfar_halt_nodisable(struct net_device *dev);
-#endif
 void gfar_start(struct net_device *dev);
 static void gfar_clear_exact_match(struct net_device *dev);
 static void gfar_set_mac_for_addr(struct net_device *dev, int num, u8 *addr);
@@ -414,9 +412,7 @@ static int gfar_suspend(struct platform_device *pdev, pm_message_t state)
                spin_unlock(&priv->rxlock);
                spin_unlock_irqrestore(&priv->txlock, flags);
 
-#ifdef CONFIG_GFAR_NAPI
                napi_disable(&priv->napi);
-#endif
 
                if (magic_packet) {
                        /* Enable interrupt on Magic Packet */
@@ -469,9 +465,7 @@ static int gfar_resume(struct platform_device *pdev)
 
        netif_device_attach(dev);
 
-#ifdef CONFIG_GFAR_NAPI
        napi_enable(&priv->napi);
-#endif
 
        return 0;
 }
@@ -635,7 +629,6 @@ static void init_registers(struct net_device *dev)
 }
 
 
-#ifdef CONFIG_PM
 /* Halt the receive and transmit queues */
 static void gfar_halt_nodisable(struct net_device *dev)
 {
@@ -661,7 +654,6 @@ static void gfar_halt_nodisable(struct net_device *dev)
                        cpu_relax();
        }
 }
-#endif
 
 /* Halt the receive and transmit queues */
 void gfar_halt(struct net_device *dev)
@@ -670,6 +662,8 @@ void gfar_halt(struct net_device *dev)
        struct gfar __iomem *regs = priv->regs;
        u32 tempval;
 
+       gfar_halt_nodisable(dev);
+
        /* Disable Rx and Tx */
        tempval = gfar_read(&regs->maccfg1);
        tempval &= ~(MACCFG1_RX_EN | MACCFG1_TX_EN);