* [PATCH 1/1] lpfc causes hang on SGI ia64 platform
@ 2009-09-18 17:02 Michael Reed
2009-09-18 18:21 ` James Smart
0 siblings, 1 reply; 3+ messages in thread
From: Michael Reed @ 2009-09-18 17:02 UTC (permalink / raw)
To: linux-scsi; +Cc: James Smart, 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 <mdr@sgi.com>
--- linux-2.6.31-kdb/drivers/scsi/lpfc/lpfc_init.c 2009-09-09 17:13:59.000000000 -0500
+++ linux-2.6.31-kdb-modified/drivers/scsi/lpfc/lpfc_init.c 2009-09-11 14:46:34.894488062 -0500
@@ -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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] lpfc causes hang on SGI ia64 platform
2009-09-18 17:02 [PATCH 1/1] lpfc causes hang on SGI ia64 platform Michael Reed
@ 2009-09-18 18:21 ` James Smart
2009-12-03 18:02 ` Michael Reed
0 siblings, 1 reply; 3+ messages in thread
From: James Smart @ 2009-09-18 18:21 UTC (permalink / raw)
To: Michael Reed; +Cc: linux-scsi
Looks good Mike.
Acked-by: James Smart <james.smart@emulex.com>
-- james s
Michael Reed wrote:
> 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 <mdr@sgi.com>
>
>
> --- linux-2.6.31-kdb/drivers/scsi/lpfc/lpfc_init.c 2009-09-09 17:13:59.000000000 -0500
> +++ linux-2.6.31-kdb-modified/drivers/scsi/lpfc/lpfc_init.c 2009-09-11 14:46:34.894488062 -0500
> @@ -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
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] lpfc causes hang on SGI ia64 platform
2009-09-18 18:21 ` James Smart
@ 2009-12-03 18:02 ` Michael Reed
0 siblings, 0 replies; 3+ messages in thread
From: Michael Reed @ 2009-12-03 18:02 UTC (permalink / raw)
To: James Bottomley; +Cc: linux-scsi, James Smart
Hi James (and James),
This patch does not yet appear to have been integrated.
Mike
James Smart wrote:
> Looks good Mike.
>
>
> Acked-by: James Smart <james.smart@emulex.com>
>
> -- james s
>
> Michael Reed wrote:
>> 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 <mdr@sgi.com>
>>
>>
>> --- linux-2.6.31-kdb/drivers/scsi/lpfc/lpfc_init.c 2009-09-09 17:13:59.000000000 -0500
>> +++ linux-2.6.31-kdb-modified/drivers/scsi/lpfc/lpfc_init.c 2009-09-11 14:46:34.894488062 -0500
>> @@ -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
>>
>>
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-12-03 18:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-18 17:02 [PATCH 1/1] lpfc causes hang on SGI ia64 platform Michael Reed
2009-09-18 18:21 ` James Smart
2009-12-03 18:02 ` Michael Reed
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).