|
@@ -3797,6 +3797,7 @@ lpfc_sli_handle_slow_ring_event_s4(struct lpfc_hba *phba,
|
|
|
struct hbq_dmabuf *dmabuf;
|
|
|
struct lpfc_cq_event *cq_event;
|
|
|
unsigned long iflag;
|
|
|
+ int count = 0;
|
|
|
|
|
|
spin_lock_irqsave(&phba->hbalock, iflag);
|
|
|
phba->hba_flag &= ~HBA_SP_QUEUE_EVT;
|
|
@@ -3818,16 +3819,22 @@ lpfc_sli_handle_slow_ring_event_s4(struct lpfc_hba *phba,
|
|
|
if (irspiocbq)
|
|
|
lpfc_sli_sp_handle_rspiocb(phba, pring,
|
|
|
irspiocbq);
|
|
|
+ count++;
|
|
|
break;
|
|
|
case CQE_CODE_RECEIVE:
|
|
|
case CQE_CODE_RECEIVE_V1:
|
|
|
dmabuf = container_of(cq_event, struct hbq_dmabuf,
|
|
|
cq_event);
|
|
|
lpfc_sli4_handle_received_buffer(phba, dmabuf);
|
|
|
+ count++;
|
|
|
break;
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
|
+
|
|
|
+ /* Limit the number of events to 64 to avoid soft lockups */
|
|
|
+ if (count == 64)
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
|