提交 46de63e2 编写于 作者: S Sumit.Saxena@lsi.com 提交者: James Bottomley

[SCSI] megaraid_sas: Set 32-bit DMA mask

If consistent DMA mask is set to 64 bit, fall back to 32bit DMA mask and 32bit consistent DMA mask.
64bit consistent DMA mask may be set on some 64bit DMA slot, which causes DMA offset "10000000000000" and
MFI_INIT and IOCTL frames will have high memory addresses, leads to firmware FAULT.
Signed-off-by: NKashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: NSumit Saxena <sumit.saxena@lsi.com>
Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
上级 be26374b
...@@ -4221,6 +4221,19 @@ megasas_set_dma_mask(struct pci_dev *pdev) ...@@ -4221,6 +4221,19 @@ megasas_set_dma_mask(struct pci_dev *pdev)
if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) != 0) if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) != 0)
goto fail_set_dma_mask; goto fail_set_dma_mask;
} }
/*
* Ensure that all data structures are allocated in 32-bit
* memory.
*/
if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)) != 0) {
/* Try 32bit DMA mask and 32 bit Consistent dma mask */
if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32))
&& !pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)))
dev_info(&pdev->dev, "set 32bit DMA mask"
"and 32 bit consistent mask\n");
else
goto fail_set_dma_mask;
}
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册