mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Lars Persson <lars.persson@axis.com>
To: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Rabin Vincent <rabinv@axis.com>,
	Lars Persson <larper@axis.com>
Subject: [PATCH net 3/5] dwc_eth_qos: use GFP_KERNEL in dma_alloc_coherent()
Date: Mon, 29 Feb 2016 16:22:32 +0100	[thread overview]
Message-ID: <954958f6c10eacc76b39b8f0d6a5528fcc675a80.1456756740.git.larper@axis.com> (raw)
In-Reply-To: <cover.1456756740.git.larper@axis.com>
In-Reply-To: <cover.1456756740.git.larper@axis.com>

From: Rabin Vincent <rabinv@axis.com>

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>
---
 drivers/net/ethernet/synopsys/dwc_eth_qos.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/synopsys/dwc_eth_qos.c b/drivers/net/ethernet/synopsys/dwc_eth_qos.c
index 53d48c0..3ca2d5c 100644
--- a/drivers/net/ethernet/synopsys/dwc_eth_qos.c
+++ b/drivers/net/ethernet/synopsys/dwc_eth_qos.c
@@ -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 +
-- 
2.1.4

  parent reply	other threads:[~2016-02-29 15:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-29 15:22 [PATCH net 0/5] dwc_eth_qos: stability fixes and support for CMA Lars Persson
2016-02-29 15:22 ` [PATCH net 1/5] dwc_eth_qos: fix race condition in dwceqos_start_xmit Lars Persson
2016-02-29 15:22 ` [PATCH net 2/5] dwc_eth_qos: release descriptors outside netif_tx_lock Lars Persson
2016-02-29 15:22 ` Lars Persson [this message]
2016-02-29 15:22 ` [PATCH net 4/5] dwc_eth_qos: use DWCEQOS_MSG_DEFAULT Lars Persson
2016-02-29 15:22 ` [PATCH net 5/5] dwc_eth_qos: do phy_start before resetting hardware Lars Persson
2016-03-02 20:01 ` [PATCH net 0/5] dwc_eth_qos: stability fixes and support for CMA David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=954958f6c10eacc76b39b8f0d6a5528fcc675a80.1456756740.git.larper@axis.com \
    --to=lars.persson@axis.com \
    --cc=larper@axis.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rabinv@axis.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®