Commit 869404cb authored by Anton Blanchard's avatar Anton Blanchard Committed by Christoph Hellwig

ipr: set coherent DMA mask

Use dma_set_mask_and_coherent() to set both the DMA and coherent
DMA mask.
Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarBrian King <brking@linux.vnet.ibm.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent d73341bf
...@@ -9582,16 +9582,17 @@ static int ipr_probe_ioa(struct pci_dev *pdev, ...@@ -9582,16 +9582,17 @@ static int ipr_probe_ioa(struct pci_dev *pdev,
ipr_init_regs(ioa_cfg); ipr_init_regs(ioa_cfg);
if (ioa_cfg->sis64) { if (ioa_cfg->sis64) {
rc = dma_set_mask(&pdev->dev, DMA_BIT_MASK(64)); rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
if (rc < 0) { if (rc < 0) {
dev_dbg(&pdev->dev, "Failed to set 64 bit PCI DMA mask\n"); dev_dbg(&pdev->dev, "Failed to set 64 bit DMA mask\n");
rc = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32)); rc = dma_set_mask_and_coherent(&pdev->dev,
DMA_BIT_MASK(32));
} }
} else } else
rc = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32)); rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
if (rc < 0) { if (rc < 0) {
dev_err(&pdev->dev, "Failed to set PCI DMA mask\n"); dev_err(&pdev->dev, "Failed to set DMA mask\n");
goto cleanup_nomem; goto cleanup_nomem;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment