aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2006-03-21 13:57:02 -0500
committerJeff Garzik <jeff@garzik.org>2006-03-21 16:00:50 -0500
commit93aea718c69d44ee492f233929686b15b5b3702d (patch)
tree8ab42f448d5b8839b81470c6909b05847cf78180
parentc3da14474063e71686039d961d14785a9c2971ae (diff)
[PATCH] skge: dma configuration cleanup
Cleanup of the part of the code that sets up DMA configuration. Should cause no real change in operation, just clearer. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
-rw-r--r--drivers/net/skge.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/drivers/net/skge.c b/drivers/net/skge.c
index deca5066a447..381669cc415f 100644
--- a/drivers/net/skge.c
+++ b/drivers/net/skge.c
@@ -3251,22 +3251,18 @@ static int __devinit skge_probe(struct pci_dev *pdev,
3251 3251
3252 pci_set_master(pdev); 3252 pci_set_master(pdev);
3253 3253
3254 if (sizeof(dma_addr_t) > sizeof(u32) && 3254 if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) {
3255 !(err = pci_set_dma_mask(pdev, DMA_64BIT_MASK))) {
3256 using_dac = 1; 3255 using_dac = 1;
3257 err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK); 3256 err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
3258 if (err < 0) { 3257 } else if (!(err = pci_set_dma_mask(pdev, DMA_32BIT_MASK))) {
3259 printk(KERN_ERR PFX "%s unable to obtain 64 bit DMA " 3258 using_dac = 0;
3260 "for consistent allocations\n", pci_name(pdev)); 3259 err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
3261 goto err_out_free_regions; 3260 }
3262 } 3261
3263 } else { 3262 if (err) {
3264 err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 3263 printk(KERN_ERR PFX "%s no usable DMA configuration\n",
3265 if (err) { 3264 pci_name(pdev));
3266 printk(KERN_ERR PFX "%s no usable DMA configuration\n", 3265 goto err_out_free_regions;
3267 pci_name(pdev));
3268 goto err_out_free_regions;
3269 }
3270 } 3266 }
3271 3267
3272#ifdef __BIG_ENDIAN 3268#ifdef __BIG_ENDIAN