aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/be2iscsi/be_main.c
diff options
context:
space:
mode:
authorJayamohan Kallickal <jayamohan.kallickal@emulex.com>2014-01-29 02:16:45 -0500
committerJames Bottomley <JBottomley@Parallels.com>2014-03-15 13:19:11 -0400
commit6c57625b3c08f67f562e8db3ba44bb5a27aaf7d2 (patch)
tree2d30f1221e4a4a053bfb6d87d08e76d3e7495e58 /drivers/scsi/be2iscsi/be_main.c
parentda3349771c7ca01415df49929b265c21bc4295c3 (diff)
[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: Minh Tran <minhduc.tran@emulex.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/be2iscsi/be_main.c')
-rw-r--r--drivers/scsi/be2iscsi/be_main.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index 7b2bd16c8156..3cd4693bc2b4 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -679,8 +679,19 @@ static int beiscsi_enable_pci(struct pci_dev *pcidev)
679 } 679 }
680 680
681 pci_set_master(pcidev); 681 pci_set_master(pcidev);
682 if (pci_set_consistent_dma_mask(pcidev, DMA_BIT_MASK(64))) { 682 ret = pci_set_dma_mask(pcidev, DMA_BIT_MASK(64));
683 ret = pci_set_consistent_dma_mask(pcidev, DMA_BIT_MASK(32)); 683 if (ret) {
684 ret = pci_set_dma_mask(pcidev, DMA_BIT_MASK(32));
685 if (ret) {
686 dev_err(&pcidev->dev, "Could not set PCI DMA Mask\n");
687 pci_disable_device(pcidev);
688 return ret;
689 } else {
690 ret = pci_set_consistent_dma_mask(pcidev,
691 DMA_BIT_MASK(32));
692 }
693 } else {
694 ret = pci_set_consistent_dma_mask(pcidev, DMA_BIT_MASK(64));
684 if (ret) { 695 if (ret) {
685 dev_err(&pcidev->dev, "Could not set PCI DMA Mask\n"); 696 dev_err(&pcidev->dev, "Could not set PCI DMA Mask\n");
686 pci_disable_device(pcidev); 697 pci_disable_device(pcidev);