aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLendacky, Thomas <Thomas.Lendacky@amd.com>2014-08-05 14:30:38 -0400
committerDavid S. Miller <davem@davemloft.net>2014-08-05 19:47:02 -0400
commitf3d0e78d2e733176c2b0d23e7a7d871c7a33c2d6 (patch)
treef6b89adc4408b4a57553e4393e1bfec5544b4217 /drivers
parentc2a198569aeab71c36156f83128916dce9561741 (diff)
amd-xgbe: Use dma_set_mask_and_coherent to set DMA mask
Use the dma_set_mask_and_coherent function to set the DMA mask rather than setting the DMA mask fields directly. This was originally done to work around a bug in the arm64 DMA support when RAM started above the 4GB boundary which has since been fixed. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/amd/xgbe/xgbe-main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-main.c b/drivers/net/ethernet/amd/xgbe/xgbe-main.c
index ec977d36063f..8aa6a9353f7b 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-main.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-main.c
@@ -303,8 +303,11 @@ static int xgbe_probe(struct platform_device *pdev)
303 /* Set the DMA mask */ 303 /* Set the DMA mask */
304 if (!dev->dma_mask) 304 if (!dev->dma_mask)
305 dev->dma_mask = &dev->coherent_dma_mask; 305 dev->dma_mask = &dev->coherent_dma_mask;
306 *(dev->dma_mask) = DMA_BIT_MASK(40); 306 ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(40));
307 dev->coherent_dma_mask = DMA_BIT_MASK(40); 307 if (ret) {
308 dev_err(dev, "dma_set_mask_and_coherent failed\n");
309 goto err_io;
310 }
308 311
309 if (of_property_read_bool(dev->of_node, "dma-coherent")) { 312 if (of_property_read_bool(dev->of_node, "dma-coherent")) {
310 pdata->axdomain = XGBE_DMA_OS_AXDOMAIN; 313 pdata->axdomain = XGBE_DMA_OS_AXDOMAIN;