From: Anton Blanchard Date: Thu, 30 Oct 2014 22:27:09 +0000 (-0500) Subject: ipr: set coherent DMA mask X-Git-Tag: firefly_0821_release~176^2~2603^2^2~128 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=869404cb4ff23a8f7af09d8395586630ff56f72f;p=firefly-linux-kernel-4.4.55.git ipr: set coherent DMA mask Use dma_set_mask_and_coherent() to set both the DMA and coherent DMA mask. Signed-off-by: Anton Blanchard Signed-off-by: Brian King Signed-off-by: Christoph Hellwig --- diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index d6b3e4617283..d8d16625a876 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c @@ -9582,16 +9582,17 @@ static int ipr_probe_ioa(struct pci_dev *pdev, ipr_init_regs(ioa_cfg); 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) { - dev_dbg(&pdev->dev, "Failed to set 64 bit PCI DMA mask\n"); - rc = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32)); + dev_dbg(&pdev->dev, "Failed to set 64 bit DMA mask\n"); + rc = dma_set_mask_and_coherent(&pdev->dev, + DMA_BIT_MASK(32)); } } 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) { - dev_err(&pdev->dev, "Failed to set PCI DMA mask\n"); + dev_err(&pdev->dev, "Failed to set DMA mask\n"); goto cleanup_nomem; }