linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi: qla1280: set 64bit coherent mask
@ 2019-01-09 14:09 Thomas Bogendoerfer
  2019-01-12  3:31 ` Martin K. Petersen
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Bogendoerfer @ 2019-01-09 14:09 UTC (permalink / raw)
  To: Michael Reed, James E.J. Bottomley, Martin K. Petersen,
	linux-scsi, linux-kernel

After Commit 54aed4dd3526 ("MIPS: IP27: use dma_direct_ops") qla1280 driver
failed on SGI IP27 machines with

qla1280: QLA1040 found on PCI bus 0, dev 0
qla1280 0000:00:00.0: enabling device (0006 -> 0007)
qla1280: Failed to get request memory
qla1280: probe of 0000:00:00.0 failed with error -12

Reason is that SGI IP27 always generates 64bit DMA addresses and has
no fallback mode for 32bit DMA addresses implemented. QLA1280
supports 64bit addressing for all DMA accesses so setting coherent mask
to 64bit fixes the issue.

Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
---
 drivers/scsi/qla1280.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c
index a414f51302b7..6856dfdfa473 100644
--- a/drivers/scsi/qla1280.c
+++ b/drivers/scsi/qla1280.c
@@ -4248,7 +4248,7 @@ qla1280_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
 	ha->devnum = devnum;	/* specifies microcode load address */
 
 #ifdef QLA_64BIT_PTR
-	if (dma_set_mask(&ha->pdev->dev, DMA_BIT_MASK(64))) {
+	if (dma_set_mask_and_coherent(&ha->pdev->dev, DMA_BIT_MASK(64))) {
 		if (dma_set_mask(&ha->pdev->dev, DMA_BIT_MASK(32))) {
 			printk(KERN_WARNING "scsi(%li): Unable to set a "
 			       "suitable DMA mask - aborting\n", ha->host_no);
-- 
2.13.7


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] scsi: qla1280: set 64bit coherent mask
  2019-01-09 14:09 [PATCH] scsi: qla1280: set 64bit coherent mask Thomas Bogendoerfer
@ 2019-01-12  3:31 ` Martin K. Petersen
  0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2019-01-12  3:31 UTC (permalink / raw)
  To: Thomas Bogendoerfer
  Cc: Michael Reed, James E.J. Bottomley, Martin K. Petersen,
	linux-scsi, linux-kernel


Thomas,

> Reason is that SGI IP27 always generates 64bit DMA addresses and has
> no fallback mode for 32bit DMA addresses implemented. QLA1280
> supports 64bit addressing for all DMA accesses so setting coherent mask
> to 64bit fixes the issue.

Applied to 5.0/scsi-fixes, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-01-12  3:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-09 14:09 [PATCH] scsi: qla1280: set 64bit coherent mask Thomas Bogendoerfer
2019-01-12  3:31 ` Martin K. Petersen

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).