Commit 93aea718c69d44ee492f233929686b15b5b3702d
Committed by
Jeff Garzik
1 parent
c3da144740
[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>
Showing 1 changed file with 10 additions and 14 deletions Side-by-side Diff
drivers/net/skge.c
... | ... | @@ -3251,22 +3251,18 @@ |
3251 | 3251 | |
3252 | 3252 | pci_set_master(pdev); |
3253 | 3253 | |
3254 | - if (sizeof(dma_addr_t) > sizeof(u32) && | |
3255 | - !(err = pci_set_dma_mask(pdev, DMA_64BIT_MASK))) { | |
3254 | + if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) { | |
3256 | 3255 | using_dac = 1; |
3257 | 3256 | err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK); |
3258 | - if (err < 0) { | |
3259 | - printk(KERN_ERR PFX "%s unable to obtain 64 bit DMA " | |
3260 | - "for consistent allocations\n", pci_name(pdev)); | |
3261 | - goto err_out_free_regions; | |
3262 | - } | |
3263 | - } else { | |
3264 | - err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); | |
3265 | - if (err) { | |
3266 | - printk(KERN_ERR PFX "%s no usable DMA configuration\n", | |
3267 | - pci_name(pdev)); | |
3268 | - goto err_out_free_regions; | |
3269 | - } | |
3257 | + } else if (!(err = pci_set_dma_mask(pdev, DMA_32BIT_MASK))) { | |
3258 | + using_dac = 0; | |
3259 | + err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); | |
3260 | + } | |
3261 | + | |
3262 | + if (err) { | |
3263 | + printk(KERN_ERR PFX "%s no usable DMA configuration\n", | |
3264 | + pci_name(pdev)); | |
3265 | + goto err_out_free_regions; | |
3270 | 3266 | } |
3271 | 3267 | |
3272 | 3268 | #ifdef __BIG_ENDIAN |