lpfc causes hang on SGI ia64 platform
Subsystems (2)
PATCH 1/1 lpfc causes hang on SGI ia64 platform
In testing 2.6.31 on one of our ia64 platforms I've encountered a hang due to the driver using hardware ATEs which are a limited resource. This is because the driver does not set the dma consistent mask to 64 bits.
Here's a patch against 2.6.31 which addresses the issue.
drivers/scsi/lpfc/lpfc_init.c +12 -4
@@ -4355,9 +4355,13 @@ lpfc_sli_pci_mem_setup(struct lpfc_hba * 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.
@@ -5911,9 +5915,13 @@ lpfc_sli4_pci_mem_setup(struct lpfc_hba 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
Looks good Mike.
-- james s
Quoted 47 lines · Michael Reed
In testing 2.6.31 on one of our ia64 platforms I've encountered a hang due to the driver using hardware ATEs which are a limited resource. This is because the driver does not set the dma consistent mask to 64 bits.
Here's a patch against 2.6.31 which addresses the issue.
Signed-off-by Michael Reed <[email protected]>drivers/scsi/lpfc/lpfc_init.c +12
-4@@ -4355,9 +4355,13 @@ lpfc_sli_pci_mem_setup(struct lpfc_hba * 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. @@ -5911,9 +5915,13 @@ lpfc_sli4_pci_mem_setup(struct lpfc_hba 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
Hi James (and James),
This patch does not yet appear to have been integrated.
Mike
Quoted 59 lines · James Smart
Looks good Mike.
Acked-by James Smart <[email protected]>-- james s
Quoted 37 lines · Michael Reed
In testing 2.6.31 on one of our ia64 platforms I've encountered a hang due to the driver using hardware ATEs which are a limited resource. This is because the driver does not set the dma consistent mask to 64 bits.
Here's a patch against 2.6.31 which addresses the issue.
Signed-off-by Michael Reed <[email protected]>drivers/scsi/lpfc/lpfc_init.c +6
-4@@ -4355,9 +4355,13 @@ lpfc_sli_pci_mem_setup(struct lpfc_hba * 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. @@ -5911,9 +5915,13 @@ lpfc_sli4_pci_mem_setup(struct lpfc_hba 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 )drivers/scsi/lpfc/lpfc_init.c lpfc_sli4_pci_mem_setup(struct lpfc_hba · line 5927
Quoted 10 lines
drivers/scsi/lpfc/lpfc_init.c +6
-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 --
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html