summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorSomnath Kotur <somnath.kotur@emulex.com>2013-06-11 11:48:22 (GMT)
committerDavid S. Miller <davem@davemloft.net>2013-06-13 08:28:36 (GMT)
commit0c5fed09ab0feedd43c362b1c7fff67fdbf9548f (patch)
tree9fb75ccdbf97aee7b742fe4b9ecb957d3ede7cea /drivers/net
parente86c986137ee410190093d9ba86b86854861b9d5 (diff)
downloadlinux-0c5fed09ab0feedd43c362b1c7fff67fdbf9548f.tar.xz
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')
-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 8bc1b21..a0b4be5 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;