Skip to content

Commit

Permalink
[SCSI] lpfc 8.3.42: Fixed failure to allocate SCSI buffer on PPC64 pl…
Browse files Browse the repository at this point in the history
…atform for SLI4 devices

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
  • Loading branch information
James Smart authored and James Bottomley committed Sep 11, 2013
1 parent acbd861 commit 092cb03
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions drivers/scsi/lpfc/lpfc_scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1000,9 +1000,12 @@ lpfc_new_scsi_buf_s4(struct lpfc_vport *vport, int num_to_alloc)
}
memset(psb->data, 0, phba->cfg_sg_dma_buf_size);

/* Page alignment is CRITICAL, double check to be sure */
if (((unsigned long)(psb->data) &
(unsigned long)(SLI4_PAGE_SIZE - 1)) != 0) {
/*
* 4K Page alignment is CRITICAL to BlockGuard, double check
* to be sure.
*/
if (phba->cfg_enable_bg && (((unsigned long)(psb->data) &
(unsigned long)(SLI4_PAGE_SIZE - 1)) != 0)) {
pci_pool_free(phba->lpfc_scsi_dma_buf_pool,
psb->data, psb->dma_handle);
kfree(psb);
Expand Down

0 comments on commit 092cb03

Please sign in to comment.