Commit 6c57625b authored by Jayamohan Kallickal's avatar Jayamohan Kallickal Committed by James Bottomley

[SCSI] be2iscsi : Fix DMA Out of SW-IOMMU space error

Setting DMA bit mask 64 and roll back to 32 if not supported.
Signed-off-by: default avatarMinh Tran <minhduc.tran@emulex.com>
Signed-off-by: default avatarJayamohan Kallickal <jayamohan.kallickal@emulex.com>
Reviewed-by: default avatarMike Christie <michaelc@cs.wisc.edu>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent da334977
...@@ -679,8 +679,19 @@ static int beiscsi_enable_pci(struct pci_dev *pcidev) ...@@ -679,8 +679,19 @@ static int beiscsi_enable_pci(struct pci_dev *pcidev)
} }
pci_set_master(pcidev); pci_set_master(pcidev);
if (pci_set_consistent_dma_mask(pcidev, DMA_BIT_MASK(64))) { ret = pci_set_dma_mask(pcidev, DMA_BIT_MASK(64));
ret = pci_set_consistent_dma_mask(pcidev, DMA_BIT_MASK(32)); if (ret) {
ret = pci_set_dma_mask(pcidev, DMA_BIT_MASK(32));
if (ret) {
dev_err(&pcidev->dev, "Could not set PCI DMA Mask\n");
pci_disable_device(pcidev);
return ret;
} else {
ret = pci_set_consistent_dma_mask(pcidev,
DMA_BIT_MASK(32));
}
} else {
ret = pci_set_consistent_dma_mask(pcidev, DMA_BIT_MASK(64));
if (ret) { if (ret) {
dev_err(&pcidev->dev, "Could not set PCI DMA Mask\n"); dev_err(&pcidev->dev, "Could not set PCI DMA Mask\n");
pci_disable_device(pcidev); pci_disable_device(pcidev);
......
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