* [PATCH 2/3] ipr: set coherent DMA mask
@ 2014-10-30 22:27 Brian King
0 siblings, 0 replies; only message in thread
From: Brian King @ 2014-10-30 22:27 UTC (permalink / raw)
To: James.Bottomley; +Cc: hch, brking, linuxppc-dev, anton, linux-scsi
From: Anton Blanchard <anton@samba.org>
Use dma_set_mask_and_coherent() to set both the DMA and coherent
DMA mask.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
---
drivers/scsi/ipr.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff -puN drivers/scsi/ipr.c~ipr_set_coherent_DMA_mask drivers/scsi/ipr.c
--- scsi-queue/drivers/scsi/ipr.c~ipr_set_coherent_DMA_mask 2014-10-30 17:15:30.007820722 -0500
+++ scsi-queue-bjking1/drivers/scsi/ipr.c 2014-10-30 17:15:30.013820667 -0500
@@ -9621,16 +9621,17 @@ static int ipr_probe_ioa(struct pci_dev
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;
}
_
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-10-30 22:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-30 22:27 [PATCH 2/3] ipr: set coherent DMA mask Brian King
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).