Commit 489f1f04 authored by Govindarajulu Varadarajan's avatar Govindarajulu Varadarajan Committed by Greg Kroah-Hartman

enic: set DMA mask to 47 bit

[ Upstream commit 322eaa06 ]

In commit 624dbf55 ("driver/net: enic: Try DMA 64 first, then
failover to DMA") DMA mask was changed from 40 bits to 64 bits.
Hardware actually supports only 47 bits.

Fixes: 624dbf55 ("driver/net: enic: Try DMA 64 first, then failover to DMA")
Signed-off-by: default avatarGovindarajulu Varadarajan <gvaradar@cisco.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 44f4aec0
...@@ -2543,11 +2543,11 @@ static int enic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -2543,11 +2543,11 @@ static int enic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
pci_set_master(pdev); pci_set_master(pdev);
/* Query PCI controller on system for DMA addressing /* Query PCI controller on system for DMA addressing
* limitation for the device. Try 64-bit first, and * limitation for the device. Try 47-bit first, and
* fail to 32-bit. * fail to 32-bit.
*/ */
err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64)); err = pci_set_dma_mask(pdev, DMA_BIT_MASK(47));
if (err) { if (err) {
err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)); err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
if (err) { if (err) {
...@@ -2561,10 +2561,10 @@ static int enic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -2561,10 +2561,10 @@ static int enic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
goto err_out_release_regions; goto err_out_release_regions;
} }
} else { } else {
err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)); err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(47));
if (err) { if (err) {
dev_err(dev, "Unable to obtain %u-bit DMA " dev_err(dev, "Unable to obtain %u-bit DMA "
"for consistent allocations, aborting\n", 64); "for consistent allocations, aborting\n", 47);
goto err_out_release_regions; goto err_out_release_regions;
} }
using_dac = 1; using_dac = 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment