aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2008-11-13 22:11:57 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-11-25 16:41:35 -0500
commit97b777db57f7226e31a4abd5e69d732037743195 (patch)
treea27e355cd0cef3f6d4d3192eebcdc6aa714ef796
parent1d450cfc97bc223e9f94a2fab888bb168e284448 (diff)
ath9k: make DMA memory consistent
Make the DMAable mameory consistent with pci_set_consistent_dma_mask(). The DMA-mapping.txt Documentation recommends this but for PCI-X considerations and on strange architecture like SGI SN2, not sure why it would fix an issue but lets see if it does, just in case. Before this, this driver was tested with x86_64 with about 7 GB of RAM, not sure if this is really needed. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath9k/main.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c
index 9d64ef565c03..3355ba4043e8 100644
--- a/drivers/net/wireless/ath9k/main.c
+++ b/drivers/net/wireless/ath9k/main.c
@@ -1591,9 +1591,18 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
1591 if (pci_enable_device(pdev)) 1591 if (pci_enable_device(pdev))
1592 return -EIO; 1592 return -EIO;
1593 1593
1594 if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) { 1594 ret = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
1595
1596 if (ret) {
1595 printk(KERN_ERR "ath9k: 32-bit DMA not available\n"); 1597 printk(KERN_ERR "ath9k: 32-bit DMA not available\n");
1596 ret = -ENODEV; 1598 goto bad;
1599 }
1600
1601 ret = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
1602
1603 if (ret) {
1604 printk(KERN_ERR "ath9k: 32-bit DMA consistent "
1605 "DMA enable faled\n");
1597 goto bad; 1606 goto bad;
1598 } 1607 }
1599 1608