pch_gbe: set dma mask to only 32 bit
From: Veaceslav Falico <hidden>
Date: 2012-02-07 19:24:03
Because pch_gbe_rx_desc->buffer_addr is u32, we cannot set dma mask to 64 bit or otherwise we could end up loosing the higher 32 bit from the return of dma_map_single(). Removing DMA_BIT_MASK(64) setting will solve it. Signed-off-by: Veaceslav Falico <redacted> ---
diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
index 3ead111..6c6713b 100644
--- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
+++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c@@ -2397,17 +2397,13 @@ static int pch_gbe_probe(struct pci_dev *pdev, if (ret) return ret; - if (pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) - || pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64))) { - ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)); + if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) { + ret = pci_set_consistent_dma_mask(pdev, + DMA_BIT_MASK(32)); if (ret) { - ret = pci_set_consistent_dma_mask(pdev, - DMA_BIT_MASK(32)); - if (ret) { - dev_err(&pdev->dev, "ERR: No usable DMA " - "configuration, aborting\n"); - goto err_disable_device; - } + dev_err(&pdev->dev, "ERR: No usable DMA " + "configuration, aborting\n"); + goto err_disable_device; } }