gianfar: Remove useless HAS_PADDING device flag
authorClaudiu Manoil <claudiu.manoil@freescale.com>
Mon, 17 Feb 2014 10:53:16 +0000 (12:53 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 18 Feb 2014 20:03:02 +0000 (15:03 -0500)
The RCTRL updates of the FSL_GIANFAR_DEV_HAS_PADDING device
flag get overriden by the FSL_GIANFAR_DEV_HAS_TIMER flag
settings, which impose a Rx padding alignment of 8 bytes.
As all the eTSEC devices that set HAS_PADDING also set the
HAS_TIMER flag, the HAS_PADDING flag is now obsolete.

Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/gianfar.c
drivers/net/ethernet/freescale/gianfar.h

index 9b12201d396d94a4cf75f54ee780ac78a7dca7d9..987f3234d23b4d0126d407c30a2f0d3cc981bc2b 100644 (file)
@@ -375,13 +375,6 @@ static void gfar_init_mac(struct net_device *ndev)
                rctrl |= RCTRL_PADDING(priv->padding);
        }
 
-       /* Insert receive time stamps into padding alignment bytes */
-       if (priv->device_flags & FSL_GIANFAR_DEV_HAS_TIMER) {
-               rctrl &= ~RCTRL_PAL_MASK;
-               rctrl |= RCTRL_PADDING(8);
-               priv->padding = 8;
-       }
-
        /* Enable HW time stamping if requested from user space */
        if (priv->hwts_rx_en) {
                rctrl |= RCTRL_PRSDEP_INIT | RCTRL_TS_ENABLE;
@@ -770,7 +763,6 @@ static int gfar_of_init(struct platform_device *ofdev, struct net_device **pdev)
                                     FSL_GIANFAR_DEV_HAS_COALESCE |
                                     FSL_GIANFAR_DEV_HAS_RMON |
                                     FSL_GIANFAR_DEV_HAS_MULTI_INTR |
-                                    FSL_GIANFAR_DEV_HAS_PADDING |
                                     FSL_GIANFAR_DEV_HAS_CSUM |
                                     FSL_GIANFAR_DEV_HAS_VLAN |
                                     FSL_GIANFAR_DEV_HAS_MAGIC_PACKET |
@@ -1168,10 +1160,9 @@ static int gfar_probe(struct platform_device *ofdev)
 
        gfar_init_addr_hash_table(priv);
 
-       if (priv->device_flags & FSL_GIANFAR_DEV_HAS_PADDING)
-               priv->padding = DEFAULT_PADDING;
-       else
-               priv->padding = 0;
+       /* Insert receive time stamps into padding alignment bytes */
+       if (priv->device_flags & FSL_GIANFAR_DEV_HAS_TIMER)
+               priv->padding = 8;
 
        if (dev->features & NETIF_F_IP_CSUM ||
            priv->device_flags & FSL_GIANFAR_DEV_HAS_TIMER)
index de6e4f63dcb230b84f488cf916b1a04bb24b0fb9..53e34662b90e99318b061d75bebc808e26b09148 100644 (file)
@@ -880,7 +880,6 @@ struct gfar {
 #define FSL_GIANFAR_DEV_HAS_CSUM               0x00000010
 #define FSL_GIANFAR_DEV_HAS_VLAN               0x00000020
 #define FSL_GIANFAR_DEV_HAS_EXTENDED_HASH      0x00000040
-#define FSL_GIANFAR_DEV_HAS_PADDING            0x00000080
 #define FSL_GIANFAR_DEV_HAS_MAGIC_PACKET       0x00000100
 #define FSL_GIANFAR_DEV_HAS_BD_STASHING                0x00000200
 #define FSL_GIANFAR_DEV_HAS_BUF_STASHING       0x00000400