aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSomnath Kotur <somnath.kotur@emulex.com>2013-06-11 07:48:22 -0400
committerDavid S. Miller <davem@davemloft.net>2013-06-13 04:28:36 -0400
commit0c5fed09ab0feedd43c362b1c7fff67fdbf9548f (patch)
tree9fb75ccdbf97aee7b742fe4b9ecb957d3ede7cea
parente86c986137ee410190093d9ba86b86854861b9d5 (diff)
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>
-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 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)
4262 netdev->features |= NETIF_F_HIGHDMA; 4262 netdev->features |= NETIF_F_HIGHDMA;
4263 } else { 4263 } else {
4264 status = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32)); 4264 status = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32));
4265 if (!status)
4266 status = dma_set_coherent_mask(&pdev->dev,
4267 DMA_BIT_MASK(32));
4265 if (status) { 4268 if (status) {
4266 dev_err(&pdev->dev, "Could not set PCI DMA Mask\n"); 4269 dev_err(&pdev->dev, "Could not set PCI DMA Mask\n");
4267 goto free_netdev; 4270 goto free_netdev;