aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorSomnath Kotur <somnath.kotur@emulex.com>2013-06-11 17:18:22 +0530
committerDavid S. Miller <davem@davemloft.net>2013-06-13 01:28:36 -0700
commit0c5fed09ab0feedd43c362b1c7fff67fdbf9548f (patch)
tree9fb75ccdbf97aee7b742fe4b9ecb957d3ede7cea /drivers/net/ethernet
parente86c986137ee410190093d9ba86b86854861b9d5 (diff)
downloadvexpress-lsk-0c5fed09ab0feedd43c362b1c7fff67fdbf9548f.tar.gz
be2net: Fix 32-bit DMA Mask handling
Fix to set the coherent DMA mask only if dma_set_mask() succeeded, and to error out if either fails. Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/emulex/benet/be_main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index 8bc1b21b1c7..a0b4be51f0d 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -4262,6 +4262,9 @@ static int be_probe(struct pci_dev *pdev, const struct pci_device_id *pdev_id)
netdev->features |= NETIF_F_HIGHDMA;
} else {
status = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32));
+ if (!status)
+ status = dma_set_coherent_mask(&pdev->dev,
+ DMA_BIT_MASK(32));
if (status) {
dev_err(&pdev->dev, "Could not set PCI DMA Mask\n");
goto free_netdev;