]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
dwc_eth_qos: use GFP_KERNEL in dma_alloc_coherent()
authorRabin Vincent <rabinv@axis.com>
Mon, 29 Feb 2016 15:22:32 +0000 (16:22 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 2 Mar 2016 19:57:15 +0000 (14:57 -0500)
Since we are in non-atomic context here we can pass GFP_KERNEL to
dma_alloc_coherent(). This enables use of the CMA.

Signed-off-by: Rabin Vincent <rabinv@axis.com>
Signed-off-by: Lars Persson <larper@axis.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/synopsys/dwc_eth_qos.c

index 53d48c0f41bc18ddbfabba8c136d0d88babe3cef..3ca2d5c9707a8c0134c9cf73ba4fbd9e4901435c 100644 (file)
@@ -1113,7 +1113,7 @@ static int dwceqos_descriptor_init(struct net_local *lp)
        /* Allocate DMA descriptors */
        size = DWCEQOS_RX_DCNT * sizeof(struct dwceqos_dma_desc);
        lp->rx_descs = dma_alloc_coherent(lp->ndev->dev.parent, size,
-                       &lp->rx_descs_addr, 0);
+                       &lp->rx_descs_addr, GFP_KERNEL);
        if (!lp->rx_descs)
                goto err_out;
        lp->rx_descs_tail_addr = lp->rx_descs_addr +
@@ -1121,7 +1121,7 @@ static int dwceqos_descriptor_init(struct net_local *lp)
 
        size = DWCEQOS_TX_DCNT * sizeof(struct dwceqos_dma_desc);
        lp->tx_descs = dma_alloc_coherent(lp->ndev->dev.parent, size,
-                       &lp->tx_descs_addr, 0);
+                       &lp->tx_descs_addr, GFP_KERNEL);
        if (!lp->tx_descs)
                goto err_out;
        lp->tx_descs_tail_addr = lp->tx_descs_addr +