net: calxedaxgmac: enable operate on 2nd frame mode
authorRob Herring <rob.herring@calxeda.com>
Mon, 5 Nov 2012 06:22:19 +0000 (06:22 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 7 Nov 2012 08:51:13 +0000 (03:51 -0500)
Enable the tx dma to start reading the next frame while sending the current
frame.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/calxeda/xgmac.c

index 16814b34d4b66ae8a39414a14e2bec0a72f89029..7f5fd17c80028c37ef6a151b43a5b69c9b566bb0 100644 (file)
 #define DMA_CONTROL_ST         0x00002000      /* Start/Stop Transmission */
 #define DMA_CONTROL_SR         0x00000002      /* Start/Stop Receive */
 #define DMA_CONTROL_DFF                0x01000000      /* Disable flush of rx frames */
+#define DMA_CONTROL_OSF                0x00000004      /* Operate on 2nd tx frame */
 
 /* DMA Normal interrupt */
 #define DMA_INTR_ENA_NIE       0x00010000      /* Normal Summary */
@@ -965,8 +966,7 @@ static int xgmac_hw_init(struct net_device *dev)
                ctrl |= XGMAC_CONTROL_IPC;
        writel(ctrl, ioaddr + XGMAC_CONTROL);
 
-       value = DMA_CONTROL_DFF;
-       writel(value, ioaddr + XGMAC_DMA_CONTROL);
+       writel(DMA_CONTROL_DFF | DMA_CONTROL_OSF, ioaddr + XGMAC_DMA_CONTROL);
 
        /* Set the HW DMA mode and the COE */
        writel(XGMAC_OMR_TSF | XGMAC_OMR_RFD | XGMAC_OMR_RFA |