FreeBSD/sys/dev/vnic/nicvf_queues.c
/*
 * Qset error interrupt handler
 *
 * As of now only CQ errors are handled
 */
Qset error interrupt handler
As of now only CQ errors are handled
Qset error interrupt handler As of now only CQ errors are handled
static void
nicvf_qs_err_task(void *arg, int pending)
{
	struct nicvf *nic;
	struct queue_set *qs;
	int qidx;
	uint64_t status;
	boolean_t enable = TRUE;
	nic = (struct nicvf *)arg;
	qs = nic->qs;
	if_setdrvflagbits(nic->ifp, IFF_DRV_OACTIVE, IFF_DRV_RUNNING);
	for (qidx = 0; qidx < qs->cq_cnt; qidx++) {
		status = nicvf_queue_reg_read(nic, NIC_QSET_CQ_0_7_STATUS,
		    qidx);
		if ((status & CQ_ERR_MASK) == 0)
			continue;
		nicvf_disable_intr(nic, NICVF_INTR_CQ, qidx);
		nicvf_sq_disable(nic, qidx);
		(void)nicvf_cq_intr_handler(nic, qidx);
		nicvf_cmp_queue_config(nic, qs, qidx, enable);
		nicvf_sq_free_used_descs(nic, &qs->sq[qidx], qidx);
		nicvf_sq_enable(nic, &qs->sq[qidx], qidx);
		nicvf_enable_intr(nic, NICVF_INTR_CQ, qidx);
	}
	if_setdrvflagbits(nic->ifp, IFF_DRV_RUNNING, IFF_DRV_OACTIVE);
	nicvf_enable_intr(nic, NICVF_INTR_QS_ERR, 0);
}
static void nicvf_qs_err_task ( void * arg , int pending ) { struct nicvf * nic ; struct queue_set * qs ; int qidx ; uint64_t status ; boolean_t enable = TRUE ; nic = ( struct nicvf * ) arg ; qs = nic -> qs ; if_setdrvflagbits ( nic -> ifp , IFF_DRV_OACTIVE , IFF_DRV_RUNNING ) ; for ( qidx = 0 ; qidx < qs -> cq_cnt ; qidx ++ ) { status = nicvf_queue_reg_read ( nic , NIC_QSET_CQ_0_7_STATUS , qidx ) ; if ( ( status & CQ_ERR_MASK ) == 0 ) continue ; nicvf_disable_intr ( nic , NICVF_INTR_CQ , qidx ) ; nicvf_sq_disable ( nic , qidx ) ; ( void ) nicvf_cq_intr_handler ( nic , qidx ) ; nicvf_cmp_queue_config ( nic , qs , qidx , enable ) ; nicvf_sq_free_used_descs ( nic , & qs -> sq [ qidx ] , qidx ) ; nicvf_sq_enable ( nic , & qs -> sq [ qidx ] , qidx ) ; nicvf_enable_intr ( nic , NICVF_INTR_CQ , qidx ) ; } if_setdrvflagbits ( nic -> ifp , IFF_DRV_RUNNING , IFF_DRV_OACTIVE ) ; nicvf_enable_intr ( nic , NICVF_INTR_QS_ERR , 0 ) ; }
Qset error interrupt handler
 As of now only CQ errors are handled
Qset error interrupt handler As of now only CQ errors are handled
/* Deactivate network interface */ /* Check if it is CQ err */ /* Process already queued CQEs and reconfig CQ */ /* Re-enable Qset error interrupt */