Skip to contentSkip to conversation

lpfc 8.3.42: Fixed failure to allocate SCSI buffer on PPC64 platform for SLI4 devices

PATCH In review James Smart 1 participant 1 message Sep 6, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 14/18 lpfc 8.3.42: Fixed failure to allocate SCSI buffer on PPC64 platform for SLI4 devices

Fixed failure to allocate SCSI buffer on PPC64 platform for SLI4 devices

---

 lpfc_scsi.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/scsi/lpfc/lpfc_scsi.c +6 -3
diff -upNr a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -1000,9 +1000,12 @@ lpfc_new_scsi_buf_s4(struct lpfc_vport *
 		}
 		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);