Lines Matching defs:chq
442 struct ata_queue *chq = chp->ch_queue;
468 (chq->queue_active == 0 || chq->queue_freeze == 0)) {
507 } else if (chq->queue_active > 0 && chq->queue_freeze == 1) {
513 KASSERT(chq->queue_active == 1);
532 } else if (chq->queue_freeze > 1)
536 if (chq->queue_freeze == 0) {
1085 struct ata_queue *chq = chp->ch_queue;
1127 if (__predict_false(!skipq && chq->queue_freeze > 0)) {
1128 if (chq->queue_flags & QF_IDLE_WAIT) {
1129 chq->queue_flags &= ~QF_IDLE_WAIT;
1135 chq->queue_freeze),
1164 KASSERT(chq->queue_active <= chq->queue_openings);
1165 const uint8_t chq_openings = (!skipq && chq->queue_openings > 1)
1166 ? (chq->queue_openings - 1) : chq->queue_openings;
1169 if (chq->queue_active >= MIN(chq_openings, drv_openings)) {
1205 SIMPLEQ_REMOVE_HEAD(&chq->queue_xfer, c_xferchain);
1223 if (!skipq && chq->queue_active < chq->queue_openings)
1271 struct ata_queue * const chq = chp->ch_queue;
1274 KASSERT((chq->active_xfers_used & __BIT(xfer->c_slot)) == 0);
1277 TAILQ_INSERT_TAIL(&chq->active_xfers, xfer, c_activechain);
1284 TAILQ_INSERT_HEAD(&chq->active_xfers, xfer, c_activechain);
1286 chq->active_xfers_used |= __BIT(xfer->c_slot);
1287 chq->queue_active++;
1307 struct ata_queue *chq = chp->ch_queue;
1314 cv_broadcast(&chq->c_active);
1343 struct ata_queue * const chq = chp->ch_queue;
1347 KASSERT(chq->queue_active > 0);
1348 KASSERT((chq->active_xfers_used & __BIT(xfer->c_slot)) != 0);
1351 if (chq->queue_active == 1)
1357 TAILQ_REMOVE(&chq->active_xfers, xfer, c_activechain);
1358 chq->active_xfers_used &= ~__BIT(xfer->c_slot);
1359 chq->queue_active--;
1364 cv_broadcast(&chq->c_cmd_finish);
1452 struct ata_queue * const chq = chp->ch_queue;
1457 TAILQ_FOREACH_SAFE(xfer, &chq->active_xfers, c_activechain, xfernext) {
1471 struct ata_queue * const chq = chp->ch_queue;
1477 while ((xfer = SIMPLEQ_FIRST(&chq->queue_xfer))) {
1495 while (chq->queue_active > 0) {
1498 TAILQ_FOREACH(xfer, &chq->active_xfers, c_activechain) {
1513 cv_wait(&chq->queue_drain, &chp->ch_lock);
2364 struct ata_queue *chq = chp->ch_queue;
2370 cv_wait(&chq->c_cmd_finish, &chp->ch_lock);