Skip to content

Commit

Permalink
ath9k: make DMA memory consistent
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Luis R. Rodriguez authored and John W. Linville committed Nov 25, 2008
1 parent 1d450cf commit 97b777d
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions drivers/net/wireless/ath9k/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1591,9 +1591,18 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
if (pci_enable_device(pdev))
return -EIO;

if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) {
ret = pci_set_dma_mask(pdev, DMA_32BIT_MASK);

if (ret) {
printk(KERN_ERR "ath9k: 32-bit DMA not available\n");
ret = -ENODEV;
goto bad;
}

ret = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);

if (ret) {
printk(KERN_ERR "ath9k: 32-bit DMA consistent "
"DMA enable faled\n");
goto bad;
}

Expand Down

0 comments on commit 97b777d

Please sign in to comment.