aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/cisco
diff options
context:
space:
mode:
authorgovindarajulu.v <govindarajulu90@gmail.com>2013-09-04 01:47:16 -0400
committerDavid S. Miller <davem@davemloft.net>2013-09-05 12:39:33 -0400
commit624dbf55a359b1d8e335c046d4e57393e7d1916d (patch)
tree3861fbc5eaa51a57851cb8ef91953f9077543f92 /drivers/net/ethernet/cisco
parentbf751ba802fe57f4f3aa5555e1446387912bef9e (diff)
driver/net: enic: Try DMA 64 first, then failover to DMA
In servers with more than 1.1 TB of RAM, the existing 40/32 bit DMA could cause failure as the DMA-able address could go outside the range addressable using 40/32 bits. The following patch first tried 64 bit DMA if possible, failover to 32 bit. Signed-off-by: Sujith Sankar <ssujith@cisco.com> Signed-off-by: Christian Benvenuti <benve@cisco.com> Signed-off-by: Govindarajulu Varadarajan <govindarajulu90@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cisco')
-rw-r--r--drivers/net/ethernet/cisco/enic/enic_main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ethernet/cisco/enic/enic_main.c b/drivers/net/ethernet/cisco/enic/enic_main.c
index 93898baa25db..7b756cf9474a 100644
--- a/drivers/net/ethernet/cisco/enic/enic_main.c
+++ b/drivers/net/ethernet/cisco/enic/enic_main.c
@@ -2080,11 +2080,11 @@ static int enic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
2080 pci_set_master(pdev); 2080 pci_set_master(pdev);
2081 2081
2082 /* Query PCI controller on system for DMA addressing 2082 /* Query PCI controller on system for DMA addressing
2083 * limitation for the device. Try 40-bit first, and 2083 * limitation for the device. Try 64-bit first, and
2084 * fail to 32-bit. 2084 * fail to 32-bit.
2085 */ 2085 */
2086 2086
2087 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(40)); 2087 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
2088 if (err) { 2088 if (err) {
2089 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)); 2089 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
2090 if (err) { 2090 if (err) {
@@ -2098,10 +2098,10 @@ static int enic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
2098 goto err_out_release_regions; 2098 goto err_out_release_regions;
2099 } 2099 }
2100 } else { 2100 } else {
2101 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(40)); 2101 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
2102 if (err) { 2102 if (err) {
2103 dev_err(dev, "Unable to obtain %u-bit DMA " 2103 dev_err(dev, "Unable to obtain %u-bit DMA "
2104 "for consistent allocations, aborting\n", 40); 2104 "for consistent allocations, aborting\n", 64);
2105 goto err_out_release_regions; 2105 goto err_out_release_regions;
2106 } 2106 }
2107 using_dac = 1; 2107 using_dac = 1;