aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_init.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_init.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 59e244f04c32..27390aa0858b 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -870,8 +870,7 @@ lpfc_post_buffer(struct lpfc_hba * phba, struct lpfc_sli_ring * pring, int cnt,
870 int type) 870 int type)
871{ 871{
872 IOCB_t *icmd; 872 IOCB_t *icmd;
873 struct list_head *lpfc_iocb_list = &phba->lpfc_iocb_list; 873 struct lpfc_iocbq *iocb;
874 struct lpfc_iocbq *iocb = NULL;
875 struct lpfc_dmabuf *mp1, *mp2; 874 struct lpfc_dmabuf *mp1, *mp2;
876 875
877 cnt += pring->missbufcnt; 876 cnt += pring->missbufcnt;
@@ -880,7 +879,7 @@ lpfc_post_buffer(struct lpfc_hba * phba, struct lpfc_sli_ring * pring, int cnt,
880 while (cnt > 0) { 879 while (cnt > 0) {
881 /* Allocate buffer for command iocb */ 880 /* Allocate buffer for command iocb */
882 spin_lock_irq(phba->host->host_lock); 881 spin_lock_irq(phba->host->host_lock);
883 list_remove_head(lpfc_iocb_list, iocb, struct lpfc_iocbq, list); 882 iocb = lpfc_sli_get_iocbq(phba);
884 spin_unlock_irq(phba->host->host_lock); 883 spin_unlock_irq(phba->host->host_lock);
885 if (iocb == NULL) { 884 if (iocb == NULL) {
886 pring->missbufcnt = cnt; 885 pring->missbufcnt = cnt;