netdev: bfin_mac: invalid data cache only once for each new rx skb buffer
[safe/jmp/linux-2.6] / drivers / net / bcm63xx_enet.c
index 5173340..faf5add 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/module.h>
 #include <linux/clk.h>
 #include <linux/etherdevice.h>
+#include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/ethtool.h>
 #include <linux/crc32.h>
@@ -343,7 +344,6 @@ static int bcm_enet_receive_queue(struct net_device *dev, int budget)
                skb->protocol = eth_type_trans(skb, dev);
                priv->stats.rx_packets++;
                priv->stats.rx_bytes += len;
-               dev->last_rx = jiffies;
                netif_receive_skb(skb);
 
        } while (--budget > 0);
@@ -565,7 +565,6 @@ static int bcm_enet_start_xmit(struct sk_buff *skb, struct net_device *dev)
 
        priv->stats.tx_bytes += skb->len;
        priv->stats.tx_packets++;
-       dev->trans_start = jiffies;
        ret = NETDEV_TX_OK;
 
 out_unlock:
@@ -958,7 +957,9 @@ static int bcm_enet_open(struct net_device *dev)
        /* all set, enable mac and interrupts, start dma engine and
         * kick rx dma channel */
        wmb();
-       enet_writel(priv, ENET_CTL_ENABLE_MASK, ENET_CTL_REG);
+       val = enet_readl(priv, ENET_CTL_REG);
+       val |= ENET_CTL_ENABLE_MASK;
+       enet_writel(priv, val, ENET_CTL_REG);
        enet_dma_writel(priv, ENETDMA_CFG_EN_MASK, ENETDMA_CFG_REG);
        enet_dma_writel(priv, ENETDMA_CHANCFG_EN_MASK,
                        ENETDMA_CHANCFG_REG(priv->rx_chan));
@@ -1645,7 +1646,6 @@ static int __devinit bcm_enet_probe(struct platform_device *pdev)
        if (!dev)
                return -ENOMEM;
        priv = netdev_priv(dev);
-       memset(priv, 0, sizeof(*priv));
 
        ret = compute_hw_mtu(priv, dev->mtu);
        if (ret)