Lines Matching defs:chan

107  * This routine will sleep and release the chan mtx during the period.
108 * chan mtx will be acquired again upon return.
111 vt9p_req_wait(struct vt9p_softc *chan, struct p9_req_t *req)
116 if (msleep(req, VT9P_MTX(chan), 0, "chan lock", vt9p_ackmaxidle * hz)) {
142 struct vt9p_softc *chan;
147 chan = handle;
148 sg = chan->vt9p_sglist;
149 vq = chan->vt9p_vq;
154 VT9P_LOCK(chan);
161 VT9P_UNLOCK(chan);
169 VT9P_UNLOCK(chan);
178 * Condvar for the submit queue. Unlock the chan
181 cv_wait(&chan->submit_cv, VT9P_MTX(chan));
186 VT9P_UNLOCK(chan);
194 error = vt9p_req_wait(chan, req);
196 VT9P_UNLOCK(chan);
200 VT9P_UNLOCK(chan);
215 struct vt9p_softc *chan;
219 chan = (struct vt9p_softc *)xsc;
220 vq = chan->vt9p_vq;
224 VT9P_LOCK(chan);
234 cv_signal(&chan->submit_cv);
235 VT9P_UNLOCK(chan);
313 struct vt9p_softc *chan;
318 chan = device_get_softc(dev);
319 chan->vt9p_dev = dev;
322 VT9P_LOCK_INIT(chan);
324 cv_init(&chan->submit_cv, "Conditional variable for submit queue" );
325 chan->max_nsegs = MAX_SUPPORTED_SGS;
326 chan->vt9p_sglist = sglist_alloc(chan->max_nsegs, M_WAITOK);
354 chan->mount_tag_len = mount_tag_len;
355 chan->mount_tag = mount_tag;
360 CTLFLAG_RD, chan->mount_tag, 0, "Mount tag");
363 error = vt9p_alloc_virtqueue(chan);
373 error = virtqueue_enable_intr(chan->vt9p_vq);
381 STAILQ_INSERT_HEAD(&global_chan_list, chan, chan_next);
398 struct vt9p_softc *sc, *chan;
400 chan = NULL;
409 chan = sc;
416 * If chan is already attached to a client then it cannot be used for
419 if (chan && chan->busy) {
420 //p9_debug(TRANS, "Channel busy: used by clnt=%p\n", chan->client);
425 if (chan) {
426 *handlep = (void *)chan;
427 chan->busy = true;
440 struct vt9p_softc *chan = handle;
442 chan->busy = false;