scsi: lpfc: Fix RQ empty firmware trap
When nvme target deferred receive logic waits for exchange resources, the corresponding receive buffer is not replenished with the hardware. This can result in a lack of asynchronous receive buffer resources in the hardware, resulting in a "2885 Port Status Event: ... error 1=0x52004a01 ..." message. Correct by replenishing the buffer whenenver the deferred logic kicks in. Update corresponding debug messages and statistics as well. [mkp: applied by hand] Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <james.smart@broadcom.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:

committed by
Martin K. Petersen

parent
91455b8509
commit
411de511c6
@@ -6535,9 +6535,11 @@ lpfc_post_rq_buffer(struct lpfc_hba *phba, struct lpfc_queue *hrq,
|
||||
struct lpfc_rqe hrqe;
|
||||
struct lpfc_rqe drqe;
|
||||
struct lpfc_rqb *rqbp;
|
||||
unsigned long flags;
|
||||
struct rqb_dmabuf *rqb_buffer;
|
||||
LIST_HEAD(rqb_buf_list);
|
||||
|
||||
spin_lock_irqsave(&phba->hbalock, flags);
|
||||
rqbp = hrq->rqbp;
|
||||
for (i = 0; i < count; i++) {
|
||||
/* IF RQ is already full, don't bother */
|
||||
@@ -6561,6 +6563,15 @@ lpfc_post_rq_buffer(struct lpfc_hba *phba, struct lpfc_queue *hrq,
|
||||
drqe.address_hi = putPaddrHigh(rqb_buffer->dbuf.phys);
|
||||
rc = lpfc_sli4_rq_put(hrq, drq, &hrqe, &drqe);
|
||||
if (rc < 0) {
|
||||
lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
|
||||
"6421 Cannot post to HRQ %d: %x %x %x "
|
||||
"DRQ %x %x\n",
|
||||
hrq->queue_id,
|
||||
hrq->host_index,
|
||||
hrq->hba_index,
|
||||
hrq->entry_count,
|
||||
drq->host_index,
|
||||
drq->hba_index);
|
||||
rqbp->rqb_free_buffer(phba, rqb_buffer);
|
||||
} else {
|
||||
list_add_tail(&rqb_buffer->hbuf.list,
|
||||
@@ -6568,6 +6579,7 @@ lpfc_post_rq_buffer(struct lpfc_hba *phba, struct lpfc_queue *hrq,
|
||||
rqbp->buffer_count++;
|
||||
}
|
||||
}
|
||||
spin_unlock_irqrestore(&phba->hbalock, flags);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user