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

[PATCH] sky2: call pci_set_consistent_dma_mask

Need to call pci_set_consistent_dma_mask in the case of 64 bit
DMA.
Signed-off-by: NStephen Hemminger <shemminger@osdl.org>
Signed-off-by: NJeff Garzik <jgarzik@pobox.com>
上级 82788c7a
...@@ -3054,13 +3054,17 @@ static int __devinit sky2_probe(struct pci_dev *pdev, ...@@ -3054,13 +3054,17 @@ static int __devinit sky2_probe(struct pci_dev *pdev,
goto err_out_free_regions; goto err_out_free_regions;
} }
if (sizeof(dma_addr_t) > sizeof(u32)) { if (sizeof(dma_addr_t) > sizeof(u32) &&
err = pci_set_dma_mask(pdev, DMA_64BIT_MASK); !(err = pci_set_dma_mask(pdev, DMA_64BIT_MASK))) {
if (!err) using_dac = 1;
using_dac = 1; err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
} if (err < 0) {
printk(KERN_ERR PFX "%s unable to obtain 64 bit DMA "
"for consistent allocations\n", pci_name(pdev));
goto err_out_free_regions;
}
if (!using_dac) { } else {
err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
if (err) { if (err) {
printk(KERN_ERR PFX "%s no usable DMA configuration\n", printk(KERN_ERR PFX "%s no usable DMA configuration\n",
...@@ -3068,6 +3072,7 @@ static int __devinit sky2_probe(struct pci_dev *pdev, ...@@ -3068,6 +3072,7 @@ static int __devinit sky2_probe(struct pci_dev *pdev,
goto err_out_free_regions; goto err_out_free_regions;
} }
} }
#ifdef __BIG_ENDIAN #ifdef __BIG_ENDIAN
/* byte swap descriptors in hardware */ /* byte swap descriptors in hardware */
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册