Merge tag 'regulator-fix-v4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git...
[cascardo/linux.git] / drivers / net / ethernet / freescale / fec_main.c
index 692ee24..5aa9d4d 100644 (file)
@@ -913,13 +913,11 @@ fec_restart(struct net_device *ndev)
         * enet-mac reset will reset mac address registers too,
         * so need to reconfigure it.
         */
-       if (fep->quirks & FEC_QUIRK_ENET_MAC) {
-               memcpy(&temp_mac, ndev->dev_addr, ETH_ALEN);
-               writel((__force u32)cpu_to_be32(temp_mac[0]),
-                      fep->hwp + FEC_ADDR_LOW);
-               writel((__force u32)cpu_to_be32(temp_mac[1]),
-                      fep->hwp + FEC_ADDR_HIGH);
-       }
+       memcpy(&temp_mac, ndev->dev_addr, ETH_ALEN);
+       writel((__force u32)cpu_to_be32(temp_mac[0]),
+              fep->hwp + FEC_ADDR_LOW);
+       writel((__force u32)cpu_to_be32(temp_mac[1]),
+              fep->hwp + FEC_ADDR_HIGH);
 
        /* Clear any outstanding interrupt. */
        writel(0xffffffff, fep->hwp + FEC_IEVENT);
@@ -1432,14 +1430,14 @@ fec_enet_rx_queue(struct net_device *ndev, int budget, u16 queue_id)
                skb_put(skb, pkt_len - 4);
                data = skb->data;
 
+               if (!is_copybreak && need_swap)
+                       swap_buffer(data, pkt_len);
+
 #if !defined(CONFIG_M5272)
                if (fep->quirks & FEC_QUIRK_HAS_RACC)
                        data = skb_pull_inline(skb, 2);
 #endif
 
-               if (!is_copybreak && need_swap)
-                       swap_buffer(data, pkt_len);
-
                /* Extract the enhanced buffer descriptor */
                ebdp = NULL;
                if (fep->bufdesc_ex)
@@ -2896,7 +2894,7 @@ fec_enet_close(struct net_device *ndev)
  * this kind of feature?).
  */
 
-#define HASH_BITS      6               /* #bits in hash */
+#define FEC_HASH_BITS  6               /* #bits in hash */
 #define CRC32_POLY     0xEDB88320
 
 static void set_multicast_list(struct net_device *ndev)
@@ -2944,10 +2942,10 @@ static void set_multicast_list(struct net_device *ndev)
                        }
                }
 
-               /* only upper 6 bits (HASH_BITS) are used
+               /* only upper 6 bits (FEC_HASH_BITS) are used
                 * which point to specific bit in he hash registers
                 */
-               hash = (crc >> (32 - HASH_BITS)) & 0x3f;
+               hash = (crc >> (32 - FEC_HASH_BITS)) & 0x3f;
 
                if (hash > 31) {
                        tmp = readl(fep->hwp + FEC_GRP_HASH_TABLE_HIGH);