Lines Matching refs:req
109 DMA_ENTRY *req;
122 if ((req = TAILQ_FIRST(&dma_free)) == NULL)
124 TAILQ_REMOVE(&dma_free, req, entries);
125 req->call_func = call_func;
126 req->int_func = int_func;
127 req->softc = softc;
128 req->lock_stat = lock_stat;
129 TAILQ_INSERT_TAIL(&dma_active, req, entries);
131 if (TAILQ_FIRST(&dma_active) != req) {
136 } while (*req->lock_stat != DMA_LOCK_GRANT);
166 DMA_ENTRY *req;
173 if ((req = TAILQ_FIRST(&dma_active)) == NULL)
175 if (req->softc != softc)
182 TAILQ_REMOVE(&dma_active, req, entries);
183 TAILQ_INSERT_HEAD(&dma_free, req, entries);
185 if ((req = TAILQ_FIRST(&dma_active)) != NULL) {
186 *req->lock_stat = DMA_LOCK_GRANT;
188 if (req->call_func == NULL)
195 add_sicallback((si_farg)req->call_func, req->softc, 0);