Lines Matching defs:queue

282  * Command queue operation functions
290 * FIB queue operation functions
1281 } else { /* cmd in waiting queue */
1377 struct aac_fib *fibp; /* FIB in AIF queue */
1507 /* Put the AIF response on the response queue */
2786 * FIBs in the message queue. At this point there should not be and
3189 /* ac is not in the queue */
3193 * Atomically insert an entry into the nominated queue, returns 0 on success or
3194 * AACERR if the queue is full.
3199 * separate queue/notify interface).
3202 aac_fib_enqueue(struct aac_softstate *softs, int queue, uint32_t fib_addr,
3211 ASSERT(queue == AAC_ADAP_NORM_CMD_Q || queue == AAC_ADAP_NORM_RESP_Q);
3214 (void) ddi_dma_sync(dma, (uintptr_t)softs->qtablep->qt_qindex[queue] - \
3223 &softs->qtablep->qt_qindex[queue][AAC_PRODUCER_INDEX]);
3225 &softs->qtablep->qt_qindex[queue][AAC_CONSUMER_INDEX]);
3228 * Wrap the queue first before we check the queue to see
3231 if (pi >= aac_qinfo[queue].size)
3234 /* XXX queue full */
3238 /* Fill in queue entry */
3239 ddi_put32(acc, &((softs->qentries[queue] + pi)->aq_fib_size), fib_size);
3240 ddi_put32(acc, &((softs->qentries[queue] + pi)->aq_fib_addr), fib_addr);
3241 (void) ddi_dma_sync(dma, (uintptr_t)(softs->qentries[queue] + pi) - \
3246 ddi_put32(acc, &softs->qtablep->qt_qindex[queue][AAC_PRODUCER_INDEX],
3249 (uintptr_t)&softs->qtablep->qt_qindex[queue][AAC_PRODUCER_INDEX] - \
3253 if (aac_qinfo[queue].notify != 0)
3254 AAC_NOTIFY(softs, aac_qinfo[queue].notify);
3259 * Atomically remove one entry from the nominated queue, returns 0 on
3260 * success or AACERR if the queue is empty.
3263 aac_fib_dequeue(struct aac_softstate *softs, int queue, int *idxp)
3275 (void) ddi_dma_sync(dma, (uintptr_t)softs->qtablep->qt_qindex[queue] - \
3279 &softs->qtablep->qt_qindex[queue][AAC_PRODUCER_INDEX]);
3281 &softs->qtablep->qt_qindex[queue][AAC_CONSUMER_INDEX]);
3283 /* Check for queue empty */
3287 if (pi >= aac_qinfo[queue].size)
3290 /* Check for queue full */
3295 * The controller does not wrap the queue,
3298 if (ci >= aac_qinfo[queue].size)
3302 (void) ddi_dma_sync(dma, (uintptr_t)(softs->qentries[queue] + pi) - \
3310 switch (queue) {
3314 &(softs->qentries[queue] + ci)->aq_fib_addr);
3320 &(softs->qentries[queue] + ci)->aq_fib_addr) / AAC_FIB_SIZE;
3324 cmn_err(CE_NOTE, "!Invalid queue in aac_fib_dequeue()");
3329 ddi_put32(acc, &softs->qtablep->qt_qindex[queue][AAC_CONSUMER_INDEX],
3332 (uintptr_t)&softs->qtablep->qt_qindex[queue][AAC_CONSUMER_INDEX] - \
3336 if (unfull && aac_qinfo[queue].notify != 0)
3337 AAC_NOTIFY(softs, aac_qinfo[queue].notify);
3738 /* Init queue table */
3788 /* Init queue entries */
6339 struct aac_fib *fibp; /* FIB in AIF queue */