]> Pileus Git - ~andy/linux/blobdiff - drivers/scsi/lpfc/lpfc_init.c
[SCSI] lpfc: Fix eh_ return codes for commands
[~andy/linux] / drivers / scsi / lpfc / lpfc_init.c
index 59e244f04c328c24d355812ca229d8473a0253ef..27390aa0858bcc5633d008da92e240d22d5dd463 100644 (file)
@@ -870,8 +870,7 @@ lpfc_post_buffer(struct lpfc_hba * phba, struct lpfc_sli_ring * pring, int cnt,
                 int type)
 {
        IOCB_t *icmd;
-       struct list_head *lpfc_iocb_list = &phba->lpfc_iocb_list;
-       struct lpfc_iocbq *iocb = NULL;
+       struct lpfc_iocbq *iocb;
        struct lpfc_dmabuf *mp1, *mp2;
 
        cnt += pring->missbufcnt;
@@ -880,7 +879,7 @@ lpfc_post_buffer(struct lpfc_hba * phba, struct lpfc_sli_ring * pring, int cnt,
        while (cnt > 0) {
                /* Allocate buffer for  command iocb */
                spin_lock_irq(phba->host->host_lock);
-               list_remove_head(lpfc_iocb_list, iocb, struct lpfc_iocbq, list);
+               iocb = lpfc_sli_get_iocbq(phba);
                spin_unlock_irq(phba->host->host_lock);
                if (iocb == NULL) {
                        pring->missbufcnt = cnt;