aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sky2.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/sky2.c')
-rw-r--r--drivers/net/sky2.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 996275245144..9f4553315960 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -3054,13 +3054,17 @@ static int __devinit sky2_probe(struct pci_dev *pdev,
3054 goto err_out_free_regions; 3054 goto err_out_free_regions;
3055 } 3055 }
3056 3056
3057 if (sizeof(dma_addr_t) > sizeof(u32)) { 3057 if (sizeof(dma_addr_t) > sizeof(u32) &&
3058 err = pci_set_dma_mask(pdev, DMA_64BIT_MASK); 3058 !(err = pci_set_dma_mask(pdev, DMA_64BIT_MASK))) {
3059 if (!err) 3059 using_dac = 1;
3060 using_dac = 1; 3060 err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
3061 } 3061 if (err < 0) {
3062 printk(KERN_ERR PFX "%s unable to obtain 64 bit DMA "
3063 "for consistent allocations\n", pci_name(pdev));
3064 goto err_out_free_regions;
3065 }
3062 3066
3063 if (!using_dac) { 3067 } else {
3064 err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 3068 err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
3065 if (err) { 3069 if (err) {
3066 printk(KERN_ERR PFX "%s no usable DMA configuration\n", 3070 printk(KERN_ERR PFX "%s no usable DMA configuration\n",
@@ -3068,6 +3072,7 @@ static int __devinit sky2_probe(struct pci_dev *pdev,
3068 goto err_out_free_regions; 3072 goto err_out_free_regions;
3069 } 3073 }
3070 } 3074 }
3075
3071#ifdef __BIG_ENDIAN 3076#ifdef __BIG_ENDIAN
3072 /* byte swap descriptors in hardware */ 3077 /* byte swap descriptors in hardware */
3073 { 3078 {