|
@@ -4506,9 +4506,13 @@ lpfc_sli_pci_mem_setup(struct lpfc_hba *phba)
|
|
|
pdev = phba->pcidev;
|
|
|
|
|
|
/* Set the device DMA mask size */
|
|
|
- if (pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) != 0)
|
|
|
- if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) != 0)
|
|
|
+ if (pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) != 0
|
|
|
+ || pci_set_consistent_dma_mask(pdev,DMA_BIT_MASK(64)) != 0) {
|
|
|
+ if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) != 0
|
|
|
+ || pci_set_consistent_dma_mask(pdev,DMA_BIT_MASK(32)) != 0) {
|
|
|
return error;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
/* Get the bus address of Bar0 and Bar2 and the number of bytes
|
|
|
* required by each mapping.
|
|
@@ -6021,9 +6025,13 @@ lpfc_sli4_pci_mem_setup(struct lpfc_hba *phba)
|
|
|
pdev = phba->pcidev;
|
|
|
|
|
|
/* Set the device DMA mask size */
|
|
|
- if (pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) != 0)
|
|
|
- if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) != 0)
|
|
|
+ if (pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) != 0
|
|
|
+ || pci_set_consistent_dma_mask(pdev,DMA_BIT_MASK(64)) != 0) {
|
|
|
+ if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) != 0
|
|
|
+ || pci_set_consistent_dma_mask(pdev,DMA_BIT_MASK(32)) != 0) {
|
|
|
return error;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
/* Get the bus address of SLI4 device Bar0, Bar1, and Bar2 and the
|
|
|
* number of bytes required by each mapping. They are actually
|