提交 93aea718 编写于 作者: S Stephen Hemminger 提交者: Jeff Garzik

[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: NStephen Hemminger <shemminger@osdl.org>
Signed-off-by: NJeff Garzik <jeff@garzik.org>
上级 c3da1447
...@@ -3251,22 +3251,18 @@ static int __devinit skge_probe(struct pci_dev *pdev, ...@@ -3251,22 +3251,18 @@ static int __devinit skge_probe(struct pci_dev *pdev,
pci_set_master(pdev); pci_set_master(pdev);
if (sizeof(dma_addr_t) > sizeof(u32) && if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) {
!(err = pci_set_dma_mask(pdev, DMA_64BIT_MASK))) {
using_dac = 1; using_dac = 1;
err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK); err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
if (err < 0) { } else if (!(err = pci_set_dma_mask(pdev, DMA_32BIT_MASK))) {
printk(KERN_ERR PFX "%s unable to obtain 64 bit DMA " using_dac = 0;
"for consistent allocations\n", pci_name(pdev)); err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
goto err_out_free_regions; }
}
} else { if (err) {
err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); printk(KERN_ERR PFX "%s no usable DMA configuration\n",
if (err) { pci_name(pdev));
printk(KERN_ERR PFX "%s no usable DMA configuration\n", goto err_out_free_regions;
pci_name(pdev));
goto err_out_free_regions;
}
} }
#ifdef __BIG_ENDIAN #ifdef __BIG_ENDIAN
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册