diff options
author | Somnath Kotur <somnath.kotur@emulex.com> | 2013-06-11 17:18:22 +0530 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-06-13 01:28:36 -0700 |
commit | 0c5fed09ab0feedd43c362b1c7fff67fdbf9548f (patch) | |
tree | 9fb75ccdbf97aee7b742fe4b9ecb957d3ede7cea /drivers | |
parent | e86c986137ee410190093d9ba86b86854861b9d5 (diff) | |
download | linux-0c5fed09ab0feedd43c362b1c7fff67fdbf9548f.tar.gz linux-0c5fed09ab0feedd43c362b1c7fff67fdbf9548f.tar.bz2 linux-0c5fed09ab0feedd43c362b1c7fff67fdbf9548f.zip |
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')
-rw-r--r-- | drivers/net/ethernet/emulex/benet/be_main.c | 3 |
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 8bc1b21b1c79..a0b4be51f0d1 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; |