aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/skge.c20
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,
3243 3243
3244 pci_set_master(pdev); 3244 pci_set_master(pdev);
3245 3245
3246 if (!(err = pci_set_dma_mask(pdev, DMA_64BIT_MASK))) 3246 if (sizeof(dma_addr_t) > sizeof(u32) &&
3247 !(err = pci_set_dma_mask(pdev, DMA_64BIT_MASK))) {
3247 using_dac = 1; 3248 using_dac = 1;
3248 else if (!(err = pci_set_dma_mask(pdev, DMA_32BIT_MASK))) { 3249 err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
3249 printk(KERN_ERR PFX "%s no usable DMA configuration\n", 3250 if (err < 0) {
3250 pci_name(pdev)); 3251 printk(KERN_ERR PFX "%s unable to obtain 64 bit DMA "
3251 goto err_out_free_regions; 3252 "for consistent allocations\n", pci_name(pdev));
3253 goto err_out_free_regions;
3254 }
3255 } else {
3256 err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
3257 if (err) {
3258 printk(KERN_ERR PFX "%s no usable DMA configuration\n",
3259 pci_name(pdev));
3260 goto err_out_free_regions;
3261 }
3252 } 3262 }
3253 3263
3254#ifdef __BIG_ENDIAN 3264#ifdef __BIG_ENDIAN