Lines Matching defs:eq

49 static int oce_wq_create(struct oce_wq *wq, struct oce_eq *eq);
56 static int oce_rq_create(struct oce_rq *rq, uint32_t if_id, struct oce_eq *eq);
64 static void oce_eq_del(struct oce_eq *eq);
66 struct oce_eq *eq, uint32_t q_len);
71 struct oce_eq *eq,
124 sc->eq[vector] = oce_eq_create(sc, EQ_LEN_1024, EQE_SIZE_4,
126 if (!sc->eq[vector])
132 rc = oce_wq_create(wq, sc->eq[i]);
141 sc->eq[(i == 0) ? 0:(i-1)]);
147 sc->mq = oce_mq_create(sc, sc->eq[0], 64);
170 struct oce_eq *eq;
189 for_all_evnt_queues(sc, eq, i) {
190 if (eq)
191 oce_eq_del(sc->eq[i]);
315 * @param eq pointer to associated event queue
318 oce_wq_create(struct oce_wq *wq, struct oce_eq *eq)
326 eq,
344 eq->cq[eq->cq_valid] = cq;
345 eq->cq_valid++;
507 * @param eq pointer to event queue
510 oce_rq_create(struct oce_rq *rq, uint32_t if_id, struct oce_eq *eq)
516 eq,
529 eq->cq[eq->cq_valid] = cq;
530 eq->cq_valid++;
576 * @retval eq success, pointer to event queue
585 struct oce_eq *eq;
588 /* allocate an eq */
589 eq = malloc(sizeof(struct oce_eq), M_DEVBUF, M_NOWAIT | M_ZERO);
590 if (eq == NULL)
593 eq->parent = (void *)sc;
594 eq->eq_id = 0xffff;
595 eq->ring = oce_create_ring_buffer(sc, q_len, item_size);
596 if (!eq->ring)
599 eq->eq_cfg.q_len = q_len;
600 eq->eq_cfg.item_size = item_size;
601 eq->eq_cfg.cur_eqd = (uint8_t) eq_delay;
603 rc = oce_mbox_create_eq(eq);
607 sc->intrs[sc->neqs++].eq = eq;
609 return eq;
612 oce_eq_del(eq);
621 * @param eq pointer to an event queue
624 oce_eq_del(struct oce_eq *eq)
628 POCE_SOFTC sc = (POCE_SOFTC) eq->parent;
630 if (eq->eq_id != 0xffff) {
633 fwcmd->params.req.id = eq->eq_id;
638 if (eq->ring != NULL) {
639 oce_destroy_ring_buffer(sc, eq->ring);
640 eq->ring = NULL;
643 free(eq, M_DEVBUF);
653 * @param eq the EQ to associate with the MQ for event notification
658 oce_mq_create(POCE_SOFTC sc, struct oce_eq *eq, uint32_t q_len)
670 cq = oce_cq_create(sc, eq, CQ_LEN_256,
740 eq->cq[eq->cq_valid] = cq;
741 eq->cq_valid++;
742 mq->cq->eq = eq;
867 * @param eq optional eq to be associated with to the cq
877 oce_cq_create(POCE_SOFTC sc, struct oce_eq *eq,
896 cq->eq = eq;
1042 * @param eq pointer to event queue structure
1046 oce_drain_eq(struct oce_eq *eq)
1051 POCE_SOFTC sc = eq->parent;
1054 eqe = RING_GET_CONSUMER_ITEM_VA(eq->ring, struct oce_eqe);
1058 bus_dmamap_sync(eq->ring->dma.tag, eq->ring->dma.map,
1061 RING_GET(eq->ring, 1);
1065 oce_arm_eq(sc, eq->eq_id, num_eqe, FALSE, TRUE);