diff options
author | Stephen Hemminger <shemminger@osdl.org> | 2006-01-17 13:43:11 -0800 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-01-17 19:27:29 -0500 |
commit | d1f3d4ddddc3c86e25ce2a41dc129cbe10e24991 (patch) | |
tree | 61da5eb8cf7c8424fbb66a2ab59635985136bdbf | |
parent | 82788c7a47e50ee8d42e3be23afb23448d651c4c (diff) |
[PATCH] sky2: call pci_set_consistent_dma_mask
Need to call pci_set_consistent_dma_mask in the case of 64 bit
DMA.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
-rw-r--r-- | drivers/net/sky2.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 99627524514..9f455331596 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c @@ -3054,13 +3054,17 @@ static int __devinit sky2_probe(struct pci_dev *pdev, goto err_out_free_regions; } - if (sizeof(dma_addr_t) > sizeof(u32)) { - err = pci_set_dma_mask(pdev, DMA_64BIT_MASK); - if (!err) - using_dac = 1; - } + if (sizeof(dma_addr_t) > sizeof(u32) && + !(err = pci_set_dma_mask(pdev, DMA_64BIT_MASK))) { + using_dac = 1; + err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK); + if (err < 0) { + printk(KERN_ERR PFX "%s unable to obtain 64 bit DMA " + "for consistent allocations\n", pci_name(pdev)); + goto err_out_free_regions; + } - if (!using_dac) { + } else { err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); if (err) { printk(KERN_ERR PFX "%s no usable DMA configuration\n", @@ -3068,6 +3072,7 @@ static int __devinit sky2_probe(struct pci_dev *pdev, goto err_out_free_regions; } } + #ifdef __BIG_ENDIAN /* byte swap descriptors in hardware */ { |