Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[firefly-linux-kernel-4.4.55.git] / drivers / net / ethernet / xilinx / ll_temac_main.c
index 5ac43e4ace25cd223c445bdba41a5b12161691b2..57c2e5ef2804ec5a89841557bb4e867c11cde5ec 100644 (file)
@@ -245,28 +245,21 @@ static int temac_dma_bd_init(struct net_device *ndev)
        /* returns a virtual address and a physical address. */
        lp->tx_bd_v = dma_alloc_coherent(ndev->dev.parent,
                                         sizeof(*lp->tx_bd_v) * TX_BD_NUM,
-                                        &lp->tx_bd_p, GFP_KERNEL);
-       if (!lp->tx_bd_v) {
-               dev_err(&ndev->dev,
-                               "unable to allocate DMA TX buffer descriptors");
+                                        &lp->tx_bd_p, GFP_KERNEL | __GFP_ZERO);
+       if (!lp->tx_bd_v)
                goto out;
-       }
+
        lp->rx_bd_v = dma_alloc_coherent(ndev->dev.parent,
                                         sizeof(*lp->rx_bd_v) * RX_BD_NUM,
-                                        &lp->rx_bd_p, GFP_KERNEL);
-       if (!lp->rx_bd_v) {
-               dev_err(&ndev->dev,
-                               "unable to allocate DMA RX buffer descriptors");
+                                        &lp->rx_bd_p, GFP_KERNEL | __GFP_ZERO);
+       if (!lp->rx_bd_v)
                goto out;
-       }
 
-       memset(lp->tx_bd_v, 0, sizeof(*lp->tx_bd_v) * TX_BD_NUM);
        for (i = 0; i < TX_BD_NUM; i++) {
                lp->tx_bd_v[i].next = lp->tx_bd_p +
                                sizeof(*lp->tx_bd_v) * ((i + 1) % TX_BD_NUM);
        }
 
-       memset(lp->rx_bd_v, 0, sizeof(*lp->rx_bd_v) * RX_BD_NUM);
        for (i = 0; i < RX_BD_NUM; i++) {
                lp->rx_bd_v[i].next = lp->rx_bd_p +
                                sizeof(*lp->rx_bd_v) * ((i + 1) % RX_BD_NUM);
@@ -1025,9 +1018,9 @@ static int temac_of_probe(struct platform_device *op)
        ndev->features |= NETIF_F_HW_CSUM; /* Can checksum all the packets. */
        ndev->features |= NETIF_F_IPV6_CSUM; /* Can checksum IPV6 TCP/UDP */
        ndev->features |= NETIF_F_HIGHDMA; /* Can DMA to high memory. */
-       ndev->features |= NETIF_F_HW_VLAN_TX; /* Transmit VLAN hw accel */
-       ndev->features |= NETIF_F_HW_VLAN_RX; /* Receive VLAN hw acceleration */
-       ndev->features |= NETIF_F_HW_VLAN_FILTER; /* Receive VLAN filtering */
+       ndev->features |= NETIF_F_HW_VLAN_CTAG_TX; /* Transmit VLAN hw accel */
+       ndev->features |= NETIF_F_HW_VLAN_CTAG_RX; /* Receive VLAN hw acceleration */
+       ndev->features |= NETIF_F_HW_VLAN_CTAG_FILTER; /* Receive VLAN filtering */
        ndev->features |= NETIF_F_VLAN_CHALLENGED; /* cannot handle VLAN pkts */
        ndev->features |= NETIF_F_GSO; /* Enable software GSO. */
        ndev->features |= NETIF_F_MULTI_QUEUE; /* Has multiple TX/RX queues */