diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2006-01-18 03:57:15 +0300 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-01-18 03:57:15 +0300 |
commit | 2baeaaa4dab6b43e35c7150d5350bfaff1284153 (patch) | |
tree | da95b3796b4c5199c330ff69f8c879b50a97551f /drivers | |
parent | ef6f63a4aafcf6c79ac371f3c78a96b76c0f0596 (diff) | |
parent | 77783a78ded96a56e3a1a0c03bbe87c56896fe6e (diff) | |
download | linux-2baeaaa4dab6b43e35c7150d5350bfaff1284153.tar.xz |
Merge branch 'upstream'
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/skge.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/drivers/net/skge.c b/drivers/net/skge.c index b538e3038058..bf55a4cfb3d2 100644 --- a/drivers/net/skge.c +++ b/drivers/net/skge.c @@ -3243,12 +3243,22 @@ static int __devinit skge_probe(struct pci_dev *pdev, pci_set_master(pdev); - if (!(err = pci_set_dma_mask(pdev, DMA_64BIT_MASK))) + if (sizeof(dma_addr_t) > sizeof(u32) && + !(err = pci_set_dma_mask(pdev, DMA_64BIT_MASK))) { using_dac = 1; - else if (!(err = pci_set_dma_mask(pdev, DMA_32BIT_MASK))) { - printk(KERN_ERR PFX "%s no usable DMA configuration\n", - pci_name(pdev)); - goto err_out_free_regions; + 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; + } + } else { + err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); + if (err) { + printk(KERN_ERR PFX "%s no usable DMA configuration\n", + pci_name(pdev)); + goto err_out_free_regions; + } } #ifdef __BIG_ENDIAN |