diff options
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_mbox.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_mbox.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/scsi/lpfc/lpfc_mbox.c b/drivers/scsi/lpfc/lpfc_mbox.c index f9b056ec6186..e84dc33ca201 100644 --- a/drivers/scsi/lpfc/lpfc_mbox.c +++ b/drivers/scsi/lpfc/lpfc_mbox.c | |||
@@ -1611,7 +1611,7 @@ lpfc_sli4_mbox_cmd_free(struct lpfc_hba *phba, struct lpfcMboxq *mbox) | |||
1611 | for (sgentry = 0; sgentry < sgecount; sgentry++) { | 1611 | for (sgentry = 0; sgentry < sgecount; sgentry++) { |
1612 | lpfc_sli4_mbx_sge_get(mbox, sgentry, &sge); | 1612 | lpfc_sli4_mbx_sge_get(mbox, sgentry, &sge); |
1613 | phyaddr = getPaddr(sge.pa_hi, sge.pa_lo); | 1613 | phyaddr = getPaddr(sge.pa_hi, sge.pa_lo); |
1614 | dma_free_coherent(&phba->pcidev->dev, PAGE_SIZE, | 1614 | dma_free_coherent(&phba->pcidev->dev, SLI4_PAGE_SIZE, |
1615 | mbox->sge_array->addr[sgentry], phyaddr); | 1615 | mbox->sge_array->addr[sgentry], phyaddr); |
1616 | } | 1616 | } |
1617 | /* Free the sge address array memory */ | 1617 | /* Free the sge address array memory */ |
@@ -1669,7 +1669,7 @@ lpfc_sli4_config(struct lpfc_hba *phba, struct lpfcMboxq *mbox, | |||
1669 | } | 1669 | } |
1670 | 1670 | ||
1671 | /* Setup for the none-embedded mbox command */ | 1671 | /* Setup for the none-embedded mbox command */ |
1672 | pcount = (PAGE_ALIGN(length))/PAGE_SIZE; | 1672 | pcount = (PAGE_ALIGN(length))/SLI4_PAGE_SIZE; |
1673 | pcount = (pcount > LPFC_SLI4_MBX_SGE_MAX_PAGES) ? | 1673 | pcount = (pcount > LPFC_SLI4_MBX_SGE_MAX_PAGES) ? |
1674 | LPFC_SLI4_MBX_SGE_MAX_PAGES : pcount; | 1674 | LPFC_SLI4_MBX_SGE_MAX_PAGES : pcount; |
1675 | /* Allocate record for keeping SGE virtual addresses */ | 1675 | /* Allocate record for keeping SGE virtual addresses */ |
@@ -1684,24 +1684,24 @@ lpfc_sli4_config(struct lpfc_hba *phba, struct lpfcMboxq *mbox, | |||
1684 | for (pagen = 0, alloc_len = 0; pagen < pcount; pagen++) { | 1684 | for (pagen = 0, alloc_len = 0; pagen < pcount; pagen++) { |
1685 | /* The DMA memory is always allocated in the length of a | 1685 | /* The DMA memory is always allocated in the length of a |
1686 | * page even though the last SGE might not fill up to a | 1686 | * page even though the last SGE might not fill up to a |
1687 | * page, this is used as a priori size of PAGE_SIZE for | 1687 | * page, this is used as a priori size of SLI4_PAGE_SIZE for |
1688 | * the later DMA memory free. | 1688 | * the later DMA memory free. |
1689 | */ | 1689 | */ |
1690 | viraddr = dma_alloc_coherent(&phba->pcidev->dev, PAGE_SIZE, | 1690 | viraddr = dma_alloc_coherent(&phba->pcidev->dev, SLI4_PAGE_SIZE, |
1691 | &phyaddr, GFP_KERNEL); | 1691 | &phyaddr, GFP_KERNEL); |
1692 | /* In case of malloc fails, proceed with whatever we have */ | 1692 | /* In case of malloc fails, proceed with whatever we have */ |
1693 | if (!viraddr) | 1693 | if (!viraddr) |
1694 | break; | 1694 | break; |
1695 | memset(viraddr, 0, PAGE_SIZE); | 1695 | memset(viraddr, 0, SLI4_PAGE_SIZE); |
1696 | mbox->sge_array->addr[pagen] = viraddr; | 1696 | mbox->sge_array->addr[pagen] = viraddr; |
1697 | /* Keep the first page for later sub-header construction */ | 1697 | /* Keep the first page for later sub-header construction */ |
1698 | if (pagen == 0) | 1698 | if (pagen == 0) |
1699 | cfg_shdr = (union lpfc_sli4_cfg_shdr *)viraddr; | 1699 | cfg_shdr = (union lpfc_sli4_cfg_shdr *)viraddr; |
1700 | resid_len = length - alloc_len; | 1700 | resid_len = length - alloc_len; |
1701 | if (resid_len > PAGE_SIZE) { | 1701 | if (resid_len > SLI4_PAGE_SIZE) { |
1702 | lpfc_sli4_mbx_sge_set(mbox, pagen, phyaddr, | 1702 | lpfc_sli4_mbx_sge_set(mbox, pagen, phyaddr, |
1703 | PAGE_SIZE); | 1703 | SLI4_PAGE_SIZE); |
1704 | alloc_len += PAGE_SIZE; | 1704 | alloc_len += SLI4_PAGE_SIZE; |
1705 | } else { | 1705 | } else { |
1706 | lpfc_sli4_mbx_sge_set(mbox, pagen, phyaddr, | 1706 | lpfc_sli4_mbx_sge_set(mbox, pagen, phyaddr, |
1707 | resid_len); | 1707 | resid_len); |